我需要删除字符串中没有a-z A-Z 0-9设置或不是空格的所有字符.
a-z A-Z 0-9
有人有这个功能吗?
php regex string
如何从PHP中的字符串中删除所有非字母数字字符?
这是我正在使用的代码:
$url = preg_replace('/\s+/', '', $string);
它只替换空格.
php regex preg-replace
php ×2
regex ×2
preg-replace ×1
string ×1