Autor: ph10 Fecha: A: ND Cc: Pcre-dev Asunto: Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertion
On Sun, 15 Jul 2018, ND via Pcre-dev wrote:
> PCRE2 version 10.31 2018-02-12
> /(?>a(*:1))(?>b(*:1))(*SKIP:1)x|.*/
> abc
> 0: bc
>
>
> If MARK in atomic don't matter for SKIP then why result is "bc" and not "abc"?
> If MARK in atomic matter for SKIP then why result is not "c"?
This was an obscure bug, which got the backtracking wrong. It was even
wrong for /(?>a(*:1))b(?>)(*SKIP:1)x|.*/ and I am amazed nobody spotted
it earlier. The bug was in the interpreter; JIT did not have the bug. I
have fixed it and committed the patch. Thanks for the report. The
pattern now matches "abc", as does Perl.