Re: The inverse problem: generate all instances of a regexp



Dr.Ruud wrote:
Andrei Alexandrescu (See Website For Email) schreef:

I wonder how this could be done elegantly. Given a regular expression
$re, write a function Generate($) that returns a list of all possible
strings that could match $re.

http://search.cpan.org/~bowmanbs/Regexp-Genex/lib/Regexp/Genex.pm

Wow, that's exactly what the doctor prescribed... thanks, Dr. Ruud :o).

Andrie
.