I would not use a regex, maybe something like ...
$str = trim($str, '"\'');
Where the second argument is what you define as punctuation.
Assuming what you really meant is to cut out things that are not letters, numbers, etc., I would go with ...
$str = preg_replace('/^\PL+|\PL\z/', '', $str);
source share