diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-01-09 20:16:54 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-09 19:59:28 +0000 |
commit | 15272685321a1d817e718f8bbfc43bbedd9f4460 (patch) | |
tree | d2f4261f858719b8008b47d3b353d3441d1cabec /regexec.c | |
parent | d85850a777b87feb3a01d2328aa281372642877e (diff) | |
download | perl-15272685321a1d817e718f8bbfc43bbedd9f4460.tar.gz |
Re: [ID 20020109.002] /(?m:...\s*$)/ is not backtracking properly
Message-Id: <200201092016.g09KGsi30119@crypt.compulink.co.uk>
p4raw-id: //depot/perl@14157
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3586,7 +3586,9 @@ S_regmatch(pTHX_ regnode *prog) n = regrepeat(scan, n); locinput = PL_reginput; if (ln < n && PL_regkind[(U8)OP(next)] == EOL && - ((!PL_multiline && OP(next) != MEOL) || OP(next) == SEOL || OP(next) == EOS)) { + ((!PL_multiline && OP(next) != MEOL) || + OP(next) == SEOL || OP(next) == EOS)) + { ln = n; /* why back off? */ /* ...because $ and \Z can match before *and* after newline at the end. Consider "\n\n" =~ /\n+\Z\n/. |