Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Maybe Escape in Dynamic RegExps

by saintmike (Vicar)
on Apr 30, 2004 at 08:18 UTC ( #349356=note: print w/replies, xml ) Need Help??


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/);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://349356]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2017-09-22 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (257 votes). Check out past polls.

    Notices?