in reply to Re: [bugs?] perldoc perlre, \G and pos()
in thread [bugs?] perldoc perlre, \G and pos()
It's not that I care so much which result it produces, as long as they are consistent!
But depending on a magically hidden memory or state is for sure a profound error.
Cheers Rolf
UPDATE:
Position zero is the start of the string. It doesn't surprise me that it thinks it hasn't matched yet.
An endless loop could only be a result of infinitely repeating matches not of the opposite. And following the documentation I quoted, it should always return the length of the match after \G, which is clearly zero, so no need for an endless loop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [bugs?] perldoc perlre, \G and pos()
by ikegami (Patriarch) on Sep 29, 2009 at 15:22 UTC | |
by LanX (Saint) on Sep 29, 2009 at 15:29 UTC | |
by ikegami (Patriarch) on Sep 29, 2009 at 15:31 UTC | |
by LanX (Saint) on Sep 29, 2009 at 15:35 UTC | |
by ikegami (Patriarch) on Sep 29, 2009 at 16:07 UTC | |
| |
|
Re^3: [bugs?] perldoc perlre, \G and pos()
by JavaFan (Canon) on Sep 29, 2009 at 21:11 UTC | |
by LanX (Saint) on Sep 30, 2009 at 12:49 UTC | |
by JavaFan (Canon) on Sep 30, 2009 at 14:19 UTC | |
|
Re^3: [bugs?] perldoc perlre, \G and pos()
by ikegami (Patriarch) on Sep 29, 2009 at 15:23 UTC |