From a5d12a4bb12ce71ab49cce848dc7c1ea4f3111f6 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Fri, 27 Dec 2013 22:12:31 +0000 Subject: [PATCH] re_intuit_start(): add comments to a block of code explain what it does! --- regexec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/regexec.c b/regexec.c index 9f0e2c6..36b4bed 100644 --- a/regexec.c +++ b/regexec.c @@ -699,6 +699,10 @@ Perl_re_intuit_start(pTHX_ goto fail; } + /* in the presence of an anchor, the anchored (relative to the + * start of the regex) substr must also be anchored relative + * to strpos. So quickly reject if substr isn't found there */ + if (prog->check_offset_min == prog->check_offset_max && !(prog->intflags & PREGf_CANY_SEEN) && ! multiline) /* /m can cause \n's to match that aren't -- 2.7.4