in reply to Get a known substring from a string
Just do this:
$1 is set to the part that matches the regex in between the brackets.if ($str =~ m/(thispart)/) { $found = $1; }
In Section
Seekers of Perl Wisdom