diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-17 17:45:58 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-17 17:45:58 +0000 |
commit | 60e71179391c62fd08759b910342438d90159dc2 (patch) | |
tree | 4663b1dd2e7608f3c046f29ec7777ba4b4adfd09 /regexec.c | |
parent | f9d788ebc632d47c20d6ded8983f6695a28922b9 (diff) | |
download | perl-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.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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; |