Re: [ID 20010809.023] perlre misleads when stating that (?i) should be at front of...
Hugo van der Sanden [Wed, 15 Aug 2001 11:32:11 +0000 (12:32 +0100)]
Message-Id: <200108151032.f7FAWBI30961@crypt.compulink.co.uk>

p4raw-id: //depot/perl@11677

regcomp.c
t/op/re_tests

index 2e37633..18aa057 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1746,6 +1746,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm)
     RExC_rx = r;
 
     /* Second pass: emit code. */
+    RExC_flags16 = pm->op_pmflags;     /* don't let top level (?i) bleed */
     RExC_parse = exp;
     RExC_end = xend;
     RExC_naughty = 0;
index ac7ef67..cda8790 100644 (file)
@@ -790,3 +790,5 @@ tt+$        xxxtt   y       -       -
 'b\s^'m        a\nb\n  n       -       -
 \ba    a       y       -       -
 ^(a(??{"(?!)"})|(a)(?{1}))b    ab      y       $2      a       # [ID 20010811.006]
+ab(?i)cd       AbCd    n       -       -       # [ID 20010809.023]
+ab(?i)cd       abCd    y       -       -