What's a good way to write the regular expression so that perl will start searching from the end of the string?
That's what end anchors ($, \z, \Z) are for... And if you only need to do a simple substring search, you can also use rindex().
In reply to Re: Optimizing a regex that replaces near the end of a string
by almut
in thread Optimizing a regex that replaces near the end of a string
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |