>> PCRE version 8.21 2011-12-12
> /(?!b)(?<=a)/+
> \P\Pa
> 0:
> 0+
In this case a partial match is not forced in the lookahead because no
characters have been inspected. So the lookahead succeeds and the restof the pattern matches.


Thanx, I understand how it works in current PCRE version. But please don't think that I want to find disaccord between how it works now and how it describes in PCRE documentation. I try to explain that present PCRE behaviour is according to documentation but is unnesessary because returns unusable results.

Let whole string be 'abc' and we want to test it against pattern '(?!b)(?<=a)'. If we apply this pattern to whole string (without 'partial hard') then result will be 'no match'. Now let this string arrive to application by two chunks: 'a' and 'bc'. Applying first chunk with 'partial hard' option results 'match'. Thus in this case we finded that whole string 'abc' matches. This contradict with expected result.

Is this planned that partial matching can bring results that contradict with nonpartial?
IMHO, no.

--
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev

Reply via email to