in reply to Generate random strings from regular expression

Very cool!

May I meditate about another approach? :)

I'm a big fan of introspection, if it was possible to catch the output of

use re 'debug'; qr(^\d{3}[-,.][A-V][a-z]{3}\d{2});
One gets (among other things)
Final program: 1: SBOL /^/ (2) 2: CURLY{3,3} (5) 4: POSIXU[\d] (0) 5: ANYOFR[,\-.] (7) 7: ANYOFR[A-V] (9) 9: CURLY{3,3} (12) 11: POSIXA[:lower:] (0) 12: CURLY{2,2} (15) 14: POSIXU[\d] (0) 15: END (0)

Now imagine a parser translating this to a DSL which generates your output... :)

Edit
Trouble is, according to re , that the debug output's format isn't guaranteed to be stable :/

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery