Reputation: 48522
I am using a tool to generate test data for our database. For columns that are string fields, we have the option of entering a regular expression that will be used to generate values for the column. I would like a regular expression that generates a 15 character string as follows:
Is this possible?
Upvotes: 1
Views: 1311
Reputation: 112210
No, regex does not generate text, it matches text.
However, if you're using Java, take a look at Xeger which can do what you want.
Also, see these similar questions:
Using Regex to generate Strings rather than match them
How do I generate text matching a regular expression from a regular expression?
Reverse regular expressions to generate data
Upvotes: 4