Lookbehind assert (?<=) error in pcre_dfa_exec
PERL 5 regular expression pattern matching
Brought to you by:
mish_the_fish
This can work:
////////////////
re> /(?<=a)b/
data> ab
0: b
///////////////
But this can not:
///////////////
re> /(?<=a)b/
data> a/P/D
No match
data> b/R/P/D
No match
///////////////
I think the second one should also get matched.
Logged In: NO
I'm afraid you are wrong. The lookbehind asserts that there must be an "a" before the "b". In your second example there is no "a" before the "b". (Comment by PH)