Re: [pcre-dev] No capture in nested negative assertions

Page principale
Supprimer ce message
Auteur: ND
Date:  
À: Pcre-dev
Sujet: Re: [pcre-dev] No capture in nested negative assertions
On 2018-07-10 11:31, ph10 wrote:

> Perl 5.026002 Regular Expressions
> /(?!(a)b)/
> a
> 0: 1: a
>/(?!(a)b|ac)/
> a
> 0:/(?!ac|(a)b)/
> a
> 0: It seems to save the capture only if there is just one branch in the
> assertion. Or maybe it has some algorithm for deciding on which branchto
> try first ... I don't know, but it all seems very inconsistent to me.



You are right. With third example I see that Perl is inconsistent.
So this topic may be closed.
May be some message to Perl authors may be sent as epilogue.