- or download this
# Captures all but the leading and trailing parens.
($file_name) = $string =~ /^\((.*)\)$/;
- or download this
# Captures the filename from the middle of the string.
# You might have incorrect results if parens are used in more than one
+ place.
($file_name) = $string =~ /\((.*)\)/;
- or download this
# Removes the leading paren and the trailing paren in place.
$string =~ s/^\(//;
$string =~ s/\)$//;