i use this code in php to detect if the string contains characters other than a-z,A-Z,0-9. I want to check if the string contains any spaces. What should I add to the pattern?
if (preg_match ('/[^a-zA-Z0-9]/i', $getmail)) {
// The string contains characters other than a-z and A-Z and 0-9
}