Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertio…

Top Page
Delete this message
Author: ph10
Date:  
To: ND
CC: Pcre-dev
Subject: 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