Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertion
On Sat, 14 Jul 2018, ND via Pcre-dev wrote: > PCRE2 version 10.31 2018-02-12 > /(*NO_START_OPT)\A(?>(*:1)a)((*:2)x|)/mark > ab > 0: a > 1: > MK: 1 > > Resulting mark is "1" when no backtracking is allowed to it. It just remembers "most recent mark" in the backtracking frame. Philip -- Philip Hazel -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev
Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertion
On Thu, 12 Jul 2018, ND via Pcre-dev wrote: > And one more thing should also be clarified in docs: > MARK name unlike MARK position is saved outside assertion or atomic group: I have tried to clarify this. Philip -- Philip Hazel -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev
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. Philip -- Philip Hazel -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev