diff options
author | Andreas König <a.koenig@mind.de> | 2005-11-04 09:17:25 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-11-04 16:26:08 +0000 |
commit | e0efdaf8e9240c19cd4636de8080d872bb373f7f (patch) | |
tree | 9d0d3182ccbc40d0448a2096b2706d5b1111ddb5 /regexec.c | |
parent | d7507f7459e6b42ee8cfc80abf2510fc2ff6a5c0 (diff) | |
download | perl-e0efdaf8e9240c19cd4636de8080d872bb373f7f.tar.gz |
[perl #19049] Incorrect $` after replacement
Message-ID: <87fyqc51bu.fsf@k75.linux.bogus>
p4raw-id: //depot/perl@25993
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2177,7 +2177,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) prog->subbeg = PL_bostr; prog->sublen = PL_regeol - PL_bostr; /* strend may have been modified */ } - prog->startp[0] = startpos - PL_bostr; + /* prog->startp[0] = startpos - PL_bostr; */ PL_reginput = startpos; PL_regstartp = prog->startp; PL_regendp = prog->endp; @@ -2221,6 +2221,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos) #endif REGCP_SET(lastcp); if (regmatch(prog->program + 1)) { + prog->startp[0] = startpos - PL_bostr; prog->endp[0] = PL_reginput - PL_bostr; return 1; } |