Possible Duplicate:
Random string that matches a regexp
Hi,
I have some regex's. Say I want to generate data in PHP that fit the individual regex.
Here is an example: ^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,6}$ Found here for example.
Now, how can I programmatically generate data that fits that regex? I would like to generate a dataset that matches the regex.
Basically a PHP version of Perl's String::Random
Many thanks.