summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-17 17:45:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-17 17:45:58 +0000
commit60e71179391c62fd08759b910342438d90159dc2 (patch)
tree4663b1dd2e7608f3c046f29ec7777ba4b4adfd09 /regexec.c
parentf9d788ebc632d47c20d6ded8983f6695a28922b9 (diff)
downloadperl-60e71179391c62fd08759b910342438d90159dc2.tar.gz
fix for C<"\nx\taa\n" =~ /^\S\s+aa$/m> (from Ilya Zakharevich)
p4raw-id: //depot/perl@4693
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/regexec.c b/regexec.c
index adde1ddb63..4a674a8b75 100644
--- a/regexec.c
+++ b/regexec.c
@@ -730,13 +730,17 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
(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;