Comment puis-je correspondre les lettres arabes avec regexp en phpComment puis-je correspondre les lettres arabes à l'aide regexp en php
Mon code
$name = $_GET("name");
if (arabic letters only and spaces) // using regexp
Comment puis-je correspondre les lettres arabes avec regexp en phpComment puis-je correspondre les lettres arabes à l'aide regexp en php
Mon code
$name = $_GET("name");
if (arabic letters only and spaces) // using regexp
Je pense que votre réponse est ici: Check the language of string based on glyphs in PHP
if(preg_match("/\p{Arabic}/u", $name])) {
echo 'valid';
}
Vous trouverez peut-être pertinent http://alex-csed.blogspot.com/2010/03/tutorial-validating-users-arabic-input.html. – Brian