in reply to Regexp and metacharacters

$ptext =~ s/^(['"]?)(.*)\1$/\Q$2/s;