I am using a regular expression to see if there is a single non-latin character within a string.
$latin_check = '/[\x{0030}-\x{007f}]/u'; //This is looking for only latin characters
if(preg_match($latin_check, $_POST['full_name'])) {
$error = true;
}
This should be checking to see if there is at least one character present that is not a a latin character. If it does not find at least a single non-latin character, then it should set $error to true.
I think my logic may be wrong. How can I find a single occurence of a non-latin character using regular expressions in php?