diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1997-12-19 11:02:50 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-01-08 12:25:38 +0000 |
commit | fe44a5e8ded57786d86db6cd28cbac7ae376fddc (patch) | |
tree | e5f546f8d9bac77eaf98fad35729cc1247723680 | |
parent | 0a0bb7c7269ef911ca3981a2b5365150a9ad4cfe (diff) | |
download | perl-fe44a5e8ded57786d86db6cd28cbac7ae376fddc.tar.gz |
Regexp fix: (?>a+)b doesn't match aaab:
Subject: Re: Regexp [PATCH] 5.004_56 (?>...)
p4raw-id: //depot/perl@399
-rw-r--r-- | regexec.c | 4 | ||||
-rw-r--r-- | t/op/re_tests | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1576,8 +1576,10 @@ regmatch(regnode *prog) logical = 0; sw = 1; } - if (OP(scan) == SUSPEND) + if (OP(scan) == SUSPEND) { locinput = reginput; + nextchar = UCHARAT(locinput); + } /* FALL THROUGH. */ case LONGJMP: do_longjump: diff --git a/t/op/re_tests b/t/op/re_tests index 29a6518cd9..b688a167f2 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -430,4 +430,7 @@ $(?<=^(a)) a y $1 a (?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a}) yaaxxaaaacd y $b 3 (?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4 (>a+)ab aaab n - - +(?>a+)b aaab y - - +((?>a+)b) aaab y $1 aaab +(?>(a+))b aaab y $1 aaa ((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x |