http://www.perlmonks.org?node_id=479762

paulski has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I've got a problem I'm hoping someone's already solved or someone can point me in the direction of some possible solutions.

I need to write some PERL code that will reverse engineer a PERL regexp. That is, given a regular expression:

e.g.

(.*)test(.*)

The code will generate a string that will match this regular expression.

e.g. code might generate the string.

"This is a test."

Has anyone looked at this type of thing before?

Thanks,

Paul