/* Even in this situation we may use MBOL flag if strpos is offset
wrt the start of the string. */
if (ml_anch && sv
- && (strpos + SvCUR(sv) != strend) && strpos[-1] != '\n') {
+ && (strpos + SvCUR(sv) != strend) && strpos[-1] != '\n'
+ /* May be due to an implicit anchor of m{.*foo} */
+ && !(prog->reganch & ROPT_IMPLICIT))
+ {
t = strpos;
goto find_anchor;
}
(long)(other_last - i_strpos)) );
goto do_other_anchored;
}
- if (!prog->float_substr) { /* Could have been deleted */
- if (ml_anch) {
- s = t = t + 1;
- goto try_at_offset;
- }
- goto fail;
+ /* Another way we could have checked stclass at the
+ current position only: */
+ if (ml_anch) {
+ s = t = t + 1;
+ DEBUG_r( PerlIO_printf(Perl_debug_log,
+ "Trying /^/m starting at offset %ld...\n",
+ (long)(t - i_strpos)) );
+ goto try_at_offset;
}
+ if (!prog->float_substr) /* Could have been deleted */
+ goto fail;
/* Check is floating subtring. */
retry_floating_check:
t = check_at - start_shift;