diff options
author | Hugo van der Sanden <hv@crypt.org> | 2002-01-13 18:06:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-13 17:35:48 +0000 |
commit | a84d97b6bddd35f5a52f4f41404bd0d52bf5089f (patch) | |
tree | 0bc20b4d0a0a50ee71816bd9661044279fdc8735 /regexec.c | |
parent | f2cc0c2fb23079bf552468dc31c132970e976dd0 (diff) | |
download | perl-a84d97b6bddd35f5a52f4f41404bd0d52bf5089f.tar.gz |
Re: lookbehind broken with latest bleedperl
Message-Id: <200201131806.g0DI6Mp20089@crypt.compulink.co.uk>
p4raw-id: //depot/perl@14240
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -140,13 +140,18 @@ PL_regkind[(U8)OP(rn)] == EXACT || PL_regkind[(U8)OP(rn)] == REF \ ) +/* + Search for mandatory following text node; for lookahead, the text must + follow but for lookbehind (rn->flags != 0) we skip to the next step. +*/ #define FIND_NEXT_IMPT(rn) STMT_START { \ while (JUMPABLE(rn)) \ - if (OP(rn) == SUSPEND || OP(rn) == IFMATCH || \ - PL_regkind[(U8)OP(rn)] == CURLY) \ + if (OP(rn) == SUSPEND || PL_regkind[(U8)OP(rn)] == CURLY) \ rn = NEXTOPER(NEXTOPER(rn)); \ else if (OP(rn) == PLUS) \ rn = NEXTOPER(rn); \ + else if (OP(rn) == IFMATCH) \ + rn = (rn->flags == 0) ? NEXTOPER(NEXTOPER(rn)) : rn + ARG(rn); \ else rn += NEXT_OFF(rn); \ } STMT_END |