标签: php string preg-match character
答案 0 :(得分:1)
这就是我的表现:
if (preg_match('/[^a-zA-Z\d]/', $string)) { //$string contains special characters, do something. }