"Orton, Yves" wrote: > On the contrary. The ability to stringify a regex is a crucial aspect power > and flexibility of perls regexes. > > Consider the following.... (conceptual demonstration): > > my $iso_date_capture=qr!(\d{4})[-/\\](\d{2})[-/\\](\d{2})!; > (my $iso_date_match=$iso_date_capture)=~s/\((?:\?[msiox-]*\:)?/(?:/g; > $iso_date_match=qr/$iso_date_match/; > > print $iso_date_capture,"\n"; > print $iso_date_match,"\n"; Cool. Never used that. In this case, the fact that qr// objects can be stringified should probably be documented somewhere. What do you think about Alex' patch then ? Does it count for an argument against it ? [but...] > Even the magic pointer is still there the stringification lookup is > hardcoded against the package 'Regexp'. > > I put a patch together (and a module) ages ago, but I never polished them > enough to publish. I don't remember having seen it.Thread Previous | Thread Next