Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Regex can't find match

by sherab (Scribe)
on Apr 07, 2014 at 19:08 UTC ( [id://1081429]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex can't find match
in thread Regex can't find match

OMG toolic, you have saved me so much trouble. Thank you very much. Now to get familiar with quotemeta.

Replies are listed 'Best First'.
Re^3: Regex can't find match
by AnomalousMonk (Archbishop) on Apr 07, 2014 at 20:05 UTC

    Specifically, the  ? quantifier regex metacharacter. See Quantifiers in perlre. Instead of quotemeta, you could also use
        $text=~s/\Q$find\E/$replace/g;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found