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.

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