in reply to Split a string to remove quotes and parentheses
$string =~ s/^\("(.*)"\)$/$1/;
# Faster than first. $string =~ s/^\("//; $string =~ s/"\)$//;
# Same as previous, less redundant. s/^\("//, s/"\)$// for $string;
Update: I didn't know the braces needed to be replaced. I'm fixed my snippets. Two following two snippet cann't be fixed:
|
|---|