Possible Duplicates:
Random Text generator based on regex Using Regex to generate Strings rather than match them
Hi, I need a matches generator for my regular expressions. E.g. for input like:
[A-Z]+[0-9]?
I get output:
FDLJUIOAF
LFDSJKHI8
B
IJKL5
And so on. I need this to show client what commands ar开发者_高级运维e currently supported so he can tell me what he wants to be added.
Does anyone know if there are such services?
Problem is - for some expressions you can have an unlimited number of strings that match it. You could brute-force all strings of length 5, but that is very computationally intensive already. I am of the opinion that a human can do a better REPRESENTATIVE job.
Here's a microsoft tool which does exactly this job:
msdn.microsoft.com : The regular expression generator
Note that the dialect may be different from the one you are using - check carefully.
精彩评论