in reply to Re^6: [bugs?] perldoc perlre, \G and pos()
in thread [bugs?] perldoc perlre, \G and pos()
You clearly see that it does match, so why do you keep saying it doesn't match in response to my explanation?
1st Pass: It thinks it hasn't matched yet because pos == 0, so it matches, setting pos = 0.
2nd Pass: It thinks it hasn't matched yet because pos == 0, so it matches, setting pos = 0.
3rd Pass: It thinks it hasn't matched yet because pos == 0, so it matches, setting pos = 0.
...
...no repeated matches like in list context.
The while isn't there for decoration. It's the one doing the repeating.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: [bugs?] perldoc perlre, \G and pos()
by LanX (Saint) on Sep 29, 2009 at 20:57 UTC | |
by ikegami (Patriarch) on Sep 29, 2009 at 23:36 UTC |