Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Maybe Escape in Dynamic RegExps

by gellyfish (Monsignor)
on Apr 30, 2004 at 08:19 UTC ( [id://349357]=note: print w/replies, xml ) Need Help??


in reply to Maybe Escape in Dynamic RegExps

The simplest way would be to use the \Q and \E in the expression:

$re= qr(/($<!\Q$a\E)\Q$b/);
and it will do the right thing.

/J\

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found