fix overeager [:foo:] parsing
Hugo van der Sanden [Fri, 30 Apr 1999 09:26:18 +0000 (10:26 +0100)]
Message-Id: <199904300826.JAA01257@crypt.compulink.co.uk>
Subject: [PATCH 5.005_{56,03}] Re: Regular expression difference b/n 5.004 & 5.005

p4raw-id: //depot/perl@3364

regcomp.c
t/op/re_tests

index 018249c..cbb9447 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2149,6 +2149,10 @@ regpposixcc(I32 value)
                PL_regcomp_parse++; /* skip over the ending ] */
                posixcc = s + 1;
            }
+           else {
+               /* maternal grandfather */
+               PL_regcomp_parse = s;
+           }
        }
     }
 
index 5abe217..ba824ae 100644 (file)
@@ -475,6 +475,7 @@ $(?<=^(a))  a       y       $1      a
 ([[.]+)        a.[b].  y       $1      .[
 [a[:xyz:       -       c       -       /[a[:xyz:/: unmatched [] in regexp
 [a[:xyz:]      -       c       -       /[a[:xyz:]/: unmatched [] in regexp
+[a[:]b[:c]     abc     y       $&      abc
 ([a[:xyz:]b]+) pbaq    y       $1      ba
 ((?>a+)b)      aaab    y       $1      aaab
 (?>(a+))b      aaab    y       $1      aaa