in reply to Re^2: Disambuating $ in (especially /m) regexps
in thread Disambuating $ in (especially /m) regexps
use strict; use warnings; my $string = "foo LAST\n" ." blftz\n" ."LINE fum\n" ; print "MATCH\n" if ($string =~ m/LAST$ .* ^LINE/xms) ;
You could solve this with:
print "MATCH\n" if ($string =~ m/LAST$ ..? ^LINE/xms) ;
|
|---|