#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)
"%*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<<b);
}
}
else
PL_reginput = locinput;
+ PL_reg_flags ^= RF_false;
goto do_ifmatch;
case IFMATCH:
n = 1;
do_ifmatch:
inner = NEXTOPER(NEXTOPER(scan));
if (regmatch(inner) != n) {
+ if (n == 0)
+ PL_reg_flags ^= RF_false;
say_no:
if (logical) {
logical = 0;
else
sayNO;
}
+ if (n == 0)
+ PL_reg_flags ^= RF_false;
say_yes:
if (logical) {
logical = 0;
^(?: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]