Topic: How to get random string length?

Just as an idea.


While testing %Rn

i am wondering how to generate random string/filename length?

For example:
%Ra{3,4} to get minimum three and maximum four  chars?



Or more general something like:
%b( 1,  %Rn{2} ).%e
or
%Rs{99}( 1,  %Rn{2} ).%e

Re: How to get random string length?

Hi,

I'm not sure to understand what you mean with %Ra{3,4}.

The idea of using variable as parameter in expressions comes and goes.
I'll have a closer look at it.

Thanks for the suggestions and your "How to"s.

Re: How to get random string length?

Rémi wrote:

I'm not sure to understand what you mean with %Ra{3,4}.

I was thinking on the regex matching parameter .{min,max}
Like that matching minimum min and maximum max signs,
%Ra{min,max} would randomly give back min to max signs.

Just to have even more randomness.

%Rn{2,4}
would give something like
123
34
5678
654
43
345



But this logic would maybe better fit to an extra "String extraction substr : ( p, n ) "
with variable parameters for an general use, not only for %R.

But only if you see the use and the time to code this. This was only something i missed from my tests.

Re: How to get random string length?

Hello,

This evolution (variables as parameters) has been added in the last build (805).
I hope it will correspond to what you expected.

Remi