register char *start;
register char *loceol = PL_regeol;
I32 l = 0;
- I32 count = 0;
+ I32 count = 0, res = 1;
if (!max)
return 0;
start = PL_reginput;
if (UTF) {
- while (PL_reginput < loceol && (scan = PL_reginput, regmatch(p))) {
+ while (PL_reginput < loceol && (scan = PL_reginput, res = regmatch(p))) {
if (!count++) {
l = 0;
while (start < PL_reginput) {
}
}
else {
- while (PL_reginput < loceol && (scan = PL_reginput, regmatch(p))) {
+ while (PL_reginput < loceol && (scan = PL_reginput, res = regmatch(p))) {
if (!count++) {
*lp = l = PL_reginput - start;
if (max != REG_INFTY && l*max < loceol - scan)
}
}
}
- if (PL_reginput < loceol)
+ if (!res)
PL_reginput = scan;
return count;
^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa
^(a(?(1)\1)){4}$ aaaaaaaaa n - -
^(a(?(1)\1)){4}$ aaaaaaaaaaa n - -
+((a{4})+) aaaaaaaaa y $1 aaaaaaaa
+(((aa){2})+) aaaaaaaaaa y $1 aaaaaaaa
+(((a{2}){2})+) aaaaaaaaaa y $1 aaaaaaaa
(?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r
(?<=a)b ab y $& b
(?<=a)b cb n - -