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

Re: Optimizing a regex that replaces near the end of a string

by thunders (Priest)
on Mar 18, 2009 at 22:55 UTC ( #751595=note: print w/replies, xml ) Need Help??


in reply to Optimizing a regex that replaces near the end of a string

Another technique I've used with some success is simply calling reverse() on the string, running the regex, and then reversing again. You'll want to benchmark against your typical input, of course.
  • Comment on Re: Optimizing a regex that replaces near the end of a string

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-09-28 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (542 votes). Check out past polls.