in reply to Regex Help

First of all your regex is a bit strange: [\s\S] means either whitespace or non-whitespace (so in effect anything) and so you might as well simply use a ".".

If you want to match agains a string that contains multiple lines use the "m" and the "s" switch ("m" to use multi-line stings and "s" to make newline match "." - see perldoc perlre)

my $s = <<__end_of_string__; start checking script end __end_of_string__ my ($match) = $s =~ /start(.*?)end/ims; print $match;
Note that this will also include the newline after "start" in your match (just as your example included the whitespace after "start").

If you don't want that you could do it like that:

my ($match) = $s =~ /start\n(.*?)end/ims;