The {multiplier} of a fixed substring was overlooked which
Hugo van der Sanden [Thu, 13 Jul 2000 19:27:13 +0000 (20:27 +0100)]
caused a wrong initial search offset for that substring.

Subject: [PATCH 5.6.0] Re: [ID 20000613.001] Regex works in v5.005_03 but fails in v5.06
Message-Id: <200007131827.TAA14487@crypt.compulink.co.uk>

p4raw-id: //depot/cfgperl@6392

regcomp.c
t/op/re_tests

index 0407e69..5b9d87e 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -901,6 +901,9 @@ S_study_chunk(pTHX_ regnode **scanp, I32 *deltap, regnode *last, scan_data_t *da
                                sv_catsv(data->last_found, last_str);
                                data->last_end += l * (mincount - 1);
                            }
+                       } else {
+                           /* start offset must point into the last copy */
+                           data->last_start_min += minnext * (mincount - 1);
                        }
                    }
                    /* It is counted once already... */
index 263bded..d944a25 100644 (file)
@@ -751,5 +751,9 @@ tt+$        xxxtt   y       -       -
 '^\S\s+aa$'m   \nx aa  y       -       -
 (^|a)b ab      y       -       -
 ^([ab]*?)(b)?(c)$      abac    y       -$2-    --
+^(?:.,){2}c    a,b,c   y       -       -
+^(.,){2}c      a,b,c   y       $1      b,
+^(?:[^,]*,){2}c        a,b,c   y       -       -
+^([^,]*,){2}c  a,b,c   y       $1      b,
 (?i)           y       -       -
 '(?!\A)x'm     a\nxb\n y       -       -