Generate string
Generates a random string
Evaluation
This expression evaluates to a function of the form:
(seed) -> any
The function is consistent with generator semantics of the Random Data step.
Processing
Given a seed value, the function returns a pseudo-random string value that matches a given regular expression.
The following regular expression syntax is supported
Pattern | Description |
---|---|
. |
Any symbol |
? |
One or zero occurrences |
+ |
One or more occurrences |
* |
Zero or more occurrences |
\d |
A digit. Equivalent to [0-9] |
\D |
Not a digit. Equivalent to [^0-9] |
\s |
Any whitespace character: carriage return, space, tab, newline, vertical tab, form feed |
\S |
Anything but a whitespace character |
\w |
Any word character. Equivalent to [a-zA-Z0-9_] |
\W |
Anything but a word character. Equivalent to [^a-zA-Z0-9_] |
\i |
Places same value as capture group with index i , i is any integer number. |
\xXX and \x{XXXX} |
Hexadecimal value of unicode characters 2 or 4 digits |
{a} and {a,b} |
Repeat a; or min a max b times. |
[...] |
Single character chosen from characters inside brackets. Use the dash to specify ranges i.e: [a-zA-Z] |
(a|b) |
Alternatives |
[^...] |
Single character not in brackets. For example: [^a-z] - any symbol except lowercase letters |
() |
Group multiple characters for repetitions or alternatives |
\ |
Escape character - use to treat characters with special meaning as literals
|
Settings
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Pattern |
string |
Regular expression specifying the format of the generated string. Examples:
|
||||||||
Chance of nil |
double |
Probability in range of 0.0 to 1.0 that the generator will return nil instead of generating a value. |