I am trying to validate form data from server-side. my interest is that the user just fill the form by Persian characters.
I am using this code:
$na
This 'should' work...
** added a ^ after the opening [ to exclude arabic/farsi characters from the match...
if (preg_match('/^[^\x{600}-\x{6FF}]+$/u', str_replace("\\\\","",$name)))