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

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

My brain was wandering this afternoon... Is it possible to generate strings given a regular expression?

Most of the time I have a string, and I want to run it through a regex to see if it matches or not. But coming from the opposite direction, given a regular expression R, is it possible to generate the set of all strings that match R?