bsb has asked for the wisdom of the Perl Monks concerning the following question:
Is there a module which can generate strings
that satisfy a certain regular expression?
Anything else I should look at?
My only lead isqr/^ab?(c|d)$/ => qw/ac abc ad abd/;
which I got from GraphViz::Regex, which parses the output to graph it.$ perl -e 'use re "debug"; /^ab?(c|d)$/'
Anything else I should look at?
Obviously there's issues about infinite languages, what does '.' do, unanchored expressions, perl's (?..) features. But let's be "Can Do" people :)
Brad
Back to
Seekers of Perl Wisdom