leading (.*) should not be implicitly ^'d
Jeff Pinyan [Sun, 6 Jan 2002 15:36:21 +0000 (10:36 -0500)]
Message-ID: <Pine.GSO.4.21.0201061532400.27018-100000@crusoe.crusoe.net>

p4raw-id: //depot/perl@14115

regcomp.c

index 07b11ee..d8ec0a9 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1848,7 +1848,7 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm)
            first = NEXTOPER(first);
            goto again;
        }
-       else if ((OP(first) == STAR &&
+       else if (!sawopen && (OP(first) == STAR &&
            PL_regkind[(U8)OP(NEXTOPER(first))] == REG_ANY) &&
            !(r->reganch & ROPT_ANCH) )
        {