如何使用PHP去除所有非alpha,数字,空格或puncutation的字符?
我尝试了以下内容,但它删除了标点符号.
preg_replace("/[^a-zA-Z0-9\s]/", "", $str);
php regex string
php ×1
regex ×1
string ×1