From: Hugo van der Sanden Date: Thu, 13 Jul 2000 19:27:13 +0000 (+0100) Subject: The {multiplier} of a fixed substring was overlooked which X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a8d968921bf85a89f4bb388b94f9acdd8b1f27f;p=p5sagit%2Fp5-mst-13.2.git The {multiplier} of a fixed substring was overlooked which 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 --- diff --git a/regcomp.c b/regcomp.c index 0407e69..5b9d87e 100644 --- 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... */ diff --git a/t/op/re_tests b/t/op/re_tests index 263bded..d944a25 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -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 - -