仅使用 php preg_replace 删除这些类型的字符


Remove only these type of chars …… using php preg_replace

我已经尝试过这个,但无法从我的字符串中删除这种字符("

):
 $string= preg_replace('/[^a-zA-Z ['n'r] ]/', '', $string);
 $string= preg_replace('/'t's's+/', '', $string);
 $string= preg_replace("/['n'r]/","=",$string);

它向我显示了我想要的,但我也想删除特殊的字符,例如:"

这似乎适用于在线测试

人员
 $string= preg_replace('/[^a-zA-Z'n'r]/', '', $string);