in reply to Generate random strings from regular expression
May I meditate about another approach? :)
I'm a big fan of introspection, if it was possible to catch the output of
One gets (among other things)use re 'debug'; qr(^\d{3}[-,.][A-V][a-z]{3}\d{2});
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... :)
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|