Re: [pcre-dev] Inconsistent behavior of some quantified groups

2020-05-04 Thread ph10
On Mon, 4 May 2020, ND via Pcre-dev wrote: > /\A(?:\1b|(?=(a)))*\z/ > ab > No match > > > Both patterns must successfully match after second iteration. Perl does exactly the same as PCRE. The problem is that analysing the pattern to discover that matching nothing in one branch might make a

[pcre-dev] Inconsistent behavior of some quantified groups

2020-05-04 Thread ND via Pcre-dev
PCRE2 version 10.34-RC1 2019-04-22 /\A(?:\1b|(?=(a)))*?\z/ ab No match /\A(?:\1b|(?=(a)))*\z/ ab No match Both patterns must successfully match after second iteration. But PCRE2 have following rule: It is possible to construct infinite loops by following a group that can match no