[pcre-dev] [Bug 2182] Lookahead behaving as though a match …

Top Page
Delete this message
Author: admin
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 2182] Lookahead behaving as though a match succeeded in a null-matching repeated group
https://bugs.exim.org/show_bug.cgi?id=2182

--- Comment #2 from John Tattarakis <tattarakis@???> ---
Sorry, me again. Further results and info: lookbehinds are also plagued. For
example:

^a(?:(?<=(.))[^c])*c

Matched against the string "abc" produces \1 = "b".

PCRE, Python, and Java regexes all exhibit this behaviour. Perl, Javascript,
and .NET regexes do not. Apparently the big implementations are completely
divided on how to handle this situation.

I would argue this is a bug rather than a difference of opinion given the
following result as compared to the above example:

^a(?:(?<=(.))[^b])*b

Now this matched against the string "abc" doesn't set \1. This seems
inconsistent with the earlier result.

--
You are receiving this mail because:
You are on the CC list for the bug.