The open question here is about performance. As for readability, the example shows pretty clearly that a complex regular expression can be made accessible to mortals.
And yes, I suppose that gradually creating a complex regular expression as a string, with parentheses carefully put in place, would do the job. Have you ever seen someone doing that? The point is, that for some reason, setting up a regular expression in stages is pretty rare (read: never seen it until now). What is much more commonplace is a bombardment of cryptic characters. And I sincerely wonder if there is any reason in the world why regular expressions should look that way. Eli Avishalom Shalit wrote: > isn't qr a performance thing ? > couldn't you have gotten the same readability with strings ? > > > -- Web: http://www.billauer.co.il _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
