Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Answer: How do i find $a and replace it with $b when it's preceded by $c?

by Anonymous Monk
on Apr 09, 2001 at 21:40 UTC ( #71091=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How do i find $a and replace it with $b when it's preceded by $c? - Answer contributed by Anonymous Monk

I did a benchmark, and the fastest solution is s/$c$a/$c$b/g. Don't use backreferences unless you have to.

  • Comment on Answer: How do i find $a and replace it with $b when it's preceded by $c?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2016-09-28 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (526 votes). Check out past polls.