Think about Loose Coupling | |
PerlMonks |
Testing regex equivalenceby loris (Hermit) |
on Feb 21, 2006 at 11:48 UTC ( [id://531661]=perlquestion: print w/replies, xml ) | Need Help?? |
loris has asked for the wisdom of the Perl Monks concerning the following question: Monks, What would the best way of testing whether two regexes are equivalent? In particular, I am interested in seeing whether some apparently complex regex is actually equivalent to .*I could obviously construct a set of strings which are somehow typical and see whether both regexes selected the same set, but that would demonstrate only rather limited equivalence and seems a bit of lame approach. Thanks, "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."
Back to
Seekers of Perl Wisdom
|
|