in reply to
Maybe Escape in Dynamic RegExps
Just escape them via the quotemeta() function or, better yet, using
\Q
and
\E
:
$re = qr(/($<!\Q$a\E)\Q$b\E/);
[download]
Comment on
Re: Maybe Escape in Dynamic RegExps
Select
or
Download
Code
In Section
Seekers of Perl Wisdom