From: Hugo van der Sanden Date: Thu, 7 Aug 2003 02:44:23 +0000 (+0100) Subject: Re: [perl #23030] Error in negative lookahead with alternations X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2b0868c4d213b2599daf5fee4d1f957f153bc02;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #23030] Error in negative lookahead with alternations Message-Id: <200308070144.h771iN906446@zen.crypt.org> p4raw-id: //depot/perl@20538 --- diff --git a/regexec.c b/regexec.c index df96924..1127933 100644 --- a/regexec.c +++ b/regexec.c @@ -87,6 +87,7 @@ #define RF_warned 2 /* warned about big count? */ #define RF_evaled 4 /* Did an EVAL with setting? */ #define RF_utf8 8 /* String contains multibyte chars? */ +#define RF_false 16 /* odd number of nested negatives */ #define UTF ((PL_reg_flags & RF_utf8) != 0) @@ -3204,7 +3205,10 @@ S_regmatch(pTHX_ regnode *prog) "%*s already tried at this position...\n", REPORT_CODE_OFF+PL_regindent*2, "") ); - sayNO_SILENT; + if (PL_reg_flags & RF_false) + sayYES; + else + sayNO_SILENT; } PL_reg_poscache[o] |= (1< <> # undef [perl #16773] ^(?:f|o|b){2,3}?(.+?)\1\z foobarbar y $1 bar ^.{2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar ^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar +.*a(?!(b|cd)*e).*f ......abef n - - # [perl #23030]