in reply to Re^3: Regex: matching character which happens exactly once (using global memory)
in thread Regex: matching character which happens exactly once
I can only judge the implementation, which considers $1 ff to be global.
This demonstrates whats happening, $2 is always the next character or empty.
DB<322> ;m/ ^ .*? (?{say "<$_ $2>"}) (.) (?=(.|$)) (*FAIL)/x <babab > <babab a> <babab b> <babab a> <babab b> <babab >
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Regex: matching character which happens exactly once (updated)
by QM (Parson) on Oct 23, 2017 at 16:57 UTC | |
by LanX (Saint) on Oct 23, 2017 at 18:51 UTC |