开发者

How can i Match arabic letters using regexp in php

开发者 https://www.devze.com 2023-01-24 04:16 出处:网络
How can i Match arabic letters with regexp in php My Code $name = $_GET(\"name\"); if (arabic letters only and spaces) // using regex开发者_C百科p

How can i Match arabic letters with regexp in php

My Code

$name = $_GET("name");

if (arabic letters only and spaces) // using regex开发者_C百科p


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';
} 
0

精彩评论

暂无评论...
验证码 换一张
取 消