Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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/);


Comment on Re: Maybe Escape in Dynamic RegExps
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://349356]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-08-21 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls