Keep It Simple, Stupid | |
PerlMonks |
Re: Maybe Escape in Dynamic RegExpsby Zaxo (Archbishop) |
on Apr 30, 2004 at 08:27 UTC ( [id://349360]=note: print w/replies, xml ) | Need Help?? |
This does what you want. my $re = qr/(?<!\Q$c\E)\Q$d\E/; The \Q . . \E pair is like quotemeta. I've changed the names to protect sort. Extra ( . . ) delimiter pair is cut. After Compline,
In Section
Seekers of Perl Wisdom
|
|