in reply to regex
should do the work.$re = qr[$start(.*?)$end]s;
Also read perldoc perlre.
Here is the extract :
m : Treat string as multiple lines. That is, change "^" and "$" from
matching the start or end of the string to matching the start or end
of any line anywhere within the string.
s : Treat string as single line. That is, change "." to match any character whatsoever, even a newline, which normally it would not match.
The "/s" and "/m" modifiers both override the "$*" setting. That is, no matter what "$*" contains, "/s" without "/m" will force "^" to match only at the beginning of the string and "$" to match only at the end (or just before a newline at the end) of the string.
|
|---|