* at position pos()-4+1, which lines up with the "a" */
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
- accounted for in the string max length.
- See [perl #115242] */
+ && !(prog->intflags & PREGf_CANY_SEEN))
{
/* Substring at constant offset from beg-of-str... */
SSize_t slen = SvCUR(check);
" Looking for check substr at fixed offset %"IVdf"...\n",
(IV)prog->check_offset_min));
- if (SvTAIL(check)) {
+ if (SvTAIL(check) && !multiline) {
/* In this case, the regex is anchored at the end too,
* so the lengths must match exactly, give or take a \n.
* NB: slen >= 1 since the last char of check is \n */
require './test.pl';
}
-plan tests => 718; # Update this when adding/deleting tests.
+plan tests => 719; # Update this when adding/deleting tests.
run_tests() unless caller;
$s =~ /$r\d{1,2}xyz/m for 1..200;
pass("BOL within //m mustn't run slowly");
+ $s = "abcdefg" x 1_000_000;
+ $s =~ /(?-m:^)abcX?fg/m for 1..100;
+ pass("BOL within //m mustn't skip absolute anchored check");
+
}
# These are based on looking at the code in regcomp.c