[pcre-dev] No capture in nested negative assertions

Góra strony
Delete this message
Autor: ND
Data:  
Dla: Pcre-dev
Temat: [pcre-dev] No capture in nested negative assertions

Good day.


PCRE documents:
"No capturing is done for a negative assertion unless it is being used as
a condition in a conditional subpattern (see the discussion below).
Matching continues after a non-conditional negative assertion only if all
its branches fail to match."


But capture also matters if it is inside even number of nested negative
assertions. But PCRE ignore this and unset capture:


PCRE2 version 10.31 2018-02-12
/(?!(?!(.)))/
ab
0:



This is not compatible with Perl.



Thanks.