问题
How can i Match arabic letters with regexp in php
My Code
$name = $_GET("name");
if (arabic letters only and spaces) // using regexp
回答1:
I think your answer is here: Check the language of string based on glyphs in PHP
if(preg_match("/\p{Arabic}/u", $name])) {
echo 'valid';
}
来源:https://stackoverflow.com/questions/4145742/how-can-i-match-arabic-letters-using-regexp-in-php