John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
I want to start searching where the previous match ended. But I don't want to match only at that position, like the \G anchor would have. Rather, I want to tell it to start trying to match there and continue forward a char at a time, as if I replaced $line with ${^POSTMATCH} only more efficiently than copying the string or deleting stuff from the beginning of the string.
The pos($line) doesn't do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex: continue from previous match
by ikegami (Patriarch) on Apr 23, 2011 at 07:55 UTC | |
by John M. Dlugosz (Monsignor) on Apr 23, 2011 at 08:02 UTC | |
by ikegami (Patriarch) on Apr 23, 2011 at 08:07 UTC | |
|
Re: Regex: continue from previous match
by moritz (Cardinal) on Apr 23, 2011 at 07:58 UTC | |
by John M. Dlugosz (Monsignor) on Apr 23, 2011 at 08:13 UTC | |
by moritz (Cardinal) on Apr 23, 2011 at 08:39 UTC |