Regular Expression generator

Last modified: June 22, 2025

The Regular Expression generator creates data based on a regular expression. In the Fill settings section, you can set up basic and custom settings.

Custom settings

Snippet: Insert a snippet into the expression.

Counter: Insert a counter into the expression.

File: Insert a file into the expression.

Column: Insert a column into the expression.

Generator: Insert a generator into the expression.

Regular Expression generator settings

Preview of the column data generated by the Regular Expression generator

Regular Expression generator

Syntax elements

Basic

Description Usage Example
ordinary chars John “John”
individual chars [dB] “d” or “B”
[star-end] range [0-9] “2” or “5”
[chars] character set [a-z0-9] “7” or “q”
[exclude chars] character set [^B-E] “A” or “D”
initial ] in char set []] ”]”
(regexp) grouping (abc)*d “abcabcd” or “d”
* zero or more abc* “abcccc” or “cb”
+1 or more abc+ “abcccc” or “abc”
? include or not abc? “ab” or “abc”
{num} repeat c{4} “cccc”
{min,} at least min repeats c{4,} “cccc” or “cccccccccc”
{,max} not more than max repeats c{,4} “cc” or “cccc”
{min, max} repeat c{3,4} “ccc” or “cccc”
0 empty string  
|alternatives True|False “True” or “False”
empty alternative (|dark|light)gray “darkgray” or “gray”
numeric counter ${counter([0-9]{4})} or ${counter(\d{4})} 0000, 0001, 0002, …, 9997, 9998, 9999
numeric counter decrement order ${counter([9876543210]{4})} 9999, 9998, 9997, …, 0002, 0001, 0000
char counter ${counter([A-Z]{2})} or ${counter(\C{2})} AA, AB, AC, … ZX, ZY, ZZ
char counter decrement order ${counter([ZYXWVUTSRQPONMLKJIHGFEDCBA]{2})} ZZ, ZY, ZX, …, AC, AB, AA
hex counter ${counter([0-9a-f]{5})} or ${counter(\h){5}} 00000, 00001, 00002, …, ffffd, ffffe, fffff
hex counter decrement order ${counter([FEDCBA9876543210]{5})} FFFFF, FFFFE, FFFFD, …, 00002, 00001, 00000
custom IDs (ID(${counter([1-9]{3})})) ID111, ID112, ID113, …, ID997, ID998, ID999
loading a TXT file content from the default folder $”FirstNamesMale.txt” John or Alen or Glen
loading a TXT file content from a user folder $”D:\folder_name\FirstNamesMale.txt” John or Alen or Glen
loading a CSV file content from the default folder [csv_second_column] $”USStates.csv[1]” Ohio or Iowa or Texas
loading a CSV file content from a user folder [csv_first_column] $”D:\folder_name\USStates.csv[0]” OH or IA or TX
loading column content from the same table $”[Gender]” F or M
loading column content from other table $”[HumanResources].[Employee].[Gender]” F or M
loading column content from a query $”[SELECT * FROM [HumanResources].[Employee] WHERE [OrganizationLevel] = 1].[Gender]” F or M
loading column content from a query of other connection $”[connection_name].[SELECT * FROM [HumanResources].[Employee] WHERE [OrganizationLevel] = 1].[Gender]” F or M
generating values according to their weight ration Ohio$”10”|Iowa$”50”|Texas$”90” Texas or Texas or Texas or Iowa or Texas
generating values from a predefined generator $”IPv4 Address” 10.0.0.4 or 192.168.1.2

Escapes

Description Usage Example
backslash \ \
dollar sign $ $
ordinary chars { {
right brace } }
left square bracket [ [
right square bracket ] ]
left parenthesis ( (
right parenthesis ) )
alternation operator | |
asterisk * *
plus mark + +
question mark \? ?
lowercase letter \c [a-z]
uppercase letter \C [A-Z]
upper- or lowercase letter \A [a-zA-Z]
upper- or lowercase letter or underscore or digit \w [a-zA-Z_0-9]
all ASCII printable characters \W [-~]
digit \d [0-9]
digit without a zero \D [1-9]
bit \b [0-1]
hexadecimal character \h [0-9a-f]
HEXADECIMAL charcater \H [0-9A-F]
carriage return \r  
line feed \l  
tab character \t  
space characters \s [\t]
unicode (UTF-16) escapes \u20ac
hexadecimal escapes \xA3 £

Additionally, you can use Snippet to add the following snippets:

Snippets Description
[a-z] lowercase letter
[A-Z] uppercase letter
[0-9] digit
\D digit without a zero
\h hexadeciaml character
[ ] space
\w upper- or lowercase letter or underscore or digit
\W all ASCII printable characters
| alternative
() group
* 0 or more repeats
+ 1 or more repeats
{5} 5 repeats
{5,9} 5 to 9 repeats
{5,} 5 or more repeats