The //s switch treats the whole string as a single line by allowing . to match a newline.if ($test_data_001 =~ /^__BEGIN_DATA__\n(.*)\n__END_DATA__$/s) { # some action }
-Mark
In reply to Re: Extract data from a line with multiple newlines in it
by kvale
in thread Extract data from a line with multiple newlines in it
by sureshr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |