From: "yves orton via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.5.HEAD-1713-
1163787467-1300.18209-15-0@perl.org>
p4raw-id: //depot/perl@29312
if (PL_curpm) {
register const REGEXP * const rx = PM_GETRE(PL_curpm);
if (rx) {
- return mg->mg_obj
- ? rx->nparens /* @+ */
- : rx->lastparen; /* @- */
+ if (mg->mg_obj) { /* @+ */
+ /* return the number possible */
+ return rx->nparens;
+ } else { /* @- */
+ I32 paren = rx->lastparen;
+
+ /* return the last filled */
+ while ( paren >= 0 &&
+ rx->startp[paren] == -1 || rx->endp[paren] == -1)
+ paren--;
+ return (U32)paren;
+ }
}
}
}
}
{
+ local $Message = "RT#22614";
+ local $_='ab';
+ our @len=();
+ /(.){1,}(?{push @len,0+@-})(.){1,}(?{})^/;
+ iseq("@len","2 2 2");
+}
+{
local $Message = "RT#18209";
my $text = ' word1 word2 word3 word4 word5 word6 ';