This is probably a stupid question with a simple elegant solution I haven't thought of....
How do I find the single line that matched in a multiline string without using .* and .* to capture everything either side of the actual regex?
$str = "this\nis my short\nstring\n";
$regex = "my";
if ($str =~ /(.*$regex.*/) {
print "Matched Line $1\n"
}