I'm interested in knowing why you want this change.
By the way, it should speed things up to to eliminate impossible starting points.
if ( my ($line) = $str =~ /^(.*?$regex.*)/m ) { print "Matched Line $line\n" }
The .*? on the LHS makes it behave more naturally if you add subcaptures.
In reply to Re: Multiline Regex
by ikegami
in thread Multiline Regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |