PHP: How to tell if a string contains any special characters? [duplicate]
问题 This question already has answers here : preg_match special characters (6 answers) Closed 2 years ago . I am using pspell to spell check some words. However if the word is something like G3523B it clearly is not a misspelled word but pspell changes it to GB. I would like somehow to qualify a word as a word before trying to spell check it. Maybe checking to see if the string contains any numbers or special characters. So what is the best way to check a string for special chars or digits? (if