in reply to Regex code block executes twice per match using look-arounds
In this case, it is your lookbehind that's causing the DFA to remember something, wander forward to see if it's relevant, and wander back when it isn't... If you put your (?{}) block at the very end it would only print when it actually finds a match.
-Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex code block executes twice per match using look-arounds
by johngg (Canon) on Jul 12, 2007 at 13:14 UTC | |
by ikegami (Patriarch) on Jul 12, 2007 at 18:33 UTC | |
by johngg (Canon) on Jul 12, 2007 at 19:20 UTC | |
by jettero (Monsignor) on Jul 12, 2007 at 15:43 UTC | |
|
Re^2: Regex code block executes twice per match using look-arounds
by sgt (Deacon) on Jul 12, 2007 at 15:02 UTC |