in reply to Re^9: Using pos() inside regexp (no /e)
in thread Using pos() inside regexp
So, for the original question "Can pos() be used inside of matching to change where the \G matches" the answer is "No. The pos does not work during matching.
\G can only possibly match where you left off. (Not processing part of the input string or processing part of the input string twice makes no sense.) Since \G can't possibly match elsewhere, trying to make it do so would result in a pattern that would never match.
So no, the answer is "No, it makes no sense".
The change does not have any effect on the matching. So it is the same as not working at all.
No, it means you think s/// or \G is broken, not pos(). But s/// and \G aren't broken.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Using pos() inside regexp (no /e)
by andal (Hermit) on Oct 15, 2010 at 07:35 UTC | |
by Anonymous Monk on Oct 15, 2010 at 08:11 UTC | |
by andal (Hermit) on Oct 18, 2010 at 11:30 UTC | |
by ikegami (Patriarch) on Oct 19, 2010 at 03:22 UTC |