Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Do you know where your variables are?
 
PerlMonks  

Re: Is there a nicer way to do regex search and replace with literal backslashes?

by moritz (Cardinal)
on Apr 14, 2012 at 21:19 UTC ( #965093=note: print w/ replies, xml ) Need Help??


in reply to Is there a nicer way to do regex search and replace with literal backslashes?

I don't quite understand what you want to do and why you're doing it in such a complicated way, but \Q$needle\E escaping inside a regex will probably help you. See perlre for details.


Comment on Re: Is there a nicer way to do regex search and replace with literal backslashes?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2013-05-19 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (397 votes), past polls