|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^3: tight loop regex optimizationby ikegami (Pope) |
| on Nov 02, 2011 at 05:29 UTC ( #935300=note: print w/ replies, xml ) | Need Help?? |
|
Think of it as a subroutine call. The engine tries to match the sub pattern at the current location, but it current location doesn't change.
Since the position on the outer regex isn't affected, replacements don't take what the sub expression matched into consideration.
Yes. One less \05 is being replaced, so one less \05 should be added.
Then I guess the next order of business is to figure out the code and write test cases.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||