|
|
| No such thing as a small change | |
| PerlMonks |
Re: Optimizing a regex that replaces near the end of a stringby thunders (Priest) |
| on Mar 18, 2009 at 22:55 UTC ( [id://751595]=note: print w/replies, xml ) | Need Help?? |
|
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||