How to create a Regular Expression in Data Generator?
Hello everybody,
it's a GREAT feature I can create a random text field using a Regular Expression, but.... HOW can I specify a regular expression?
Hello everybody,
it's a GREAT feature I can create a random text field using a Regular Expression, but.... HOW can I specify a regular expression?
The syntax and operators we support so far is the following:
.
\
()
{n}
{n,m}
{n,}
*
+
?
|
[a-kmoxA-E0-9]
[^aeoui]
Some useful regular expressions are like:
206\-[2-9]{3}\-[0-9]{4}|\(425\)\-[2-9]{3}\-[0-9]{4}|604\-[2-9]{3}\-[0-9]{4}
[a-z]{6}[0-9]{0,5}@(microsoft\.com|hotmail\.com|msn\.com)
[1-6]{1}[0-9]{1,3} (SE|NE|NW|SW){1} [1-2]{1}[0-9]{1,2}th (ST|CT|PL|AVE){1}\, (Redmond\, WA 9805[0-9]{1}|Bellevue\, WA 9800[1-9]{1}|Sammamish\, WA 9807[0-9]{1}|Seattle\, WA 9806[0-9]{1}|Issaquah\, WA 9808[0-9]{1})
DHL|FedEx|UPS
Just copy and paste one of them into Expression property and see the result generated, also make sure the column size is large enough to hold the strings generated otherwise you will get a complaining message.
Hope you will enjoy it.
Thanks!
Henry Zhang