Re: RegEx to check for non-Latin characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks everyone. I guess I find the answer:

*    // return true if the $str ONLY consists of Arabic characters and
space-character
    public function isArabicString($str)
    {
        return preg_match('/^([\p{Arabic}]|\s)*$/u', $str);
    }
*
PHP 5.1.x or higher is required.
@see: http://www.regular-expressions.info/unicode.html

Cheers,
-b

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux