in reply to Extract data from a line with multiple newlines in it
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extract data from a line with multiple newlines in it
by sureshr (Beadle) on Feb 11, 2004 at 09:38 UTC |