且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在php中使用regexp匹配阿拉伯字母

更新时间:2023-02-26 08:14:13

我认为您的答案在这里: 根据PHP中的字形检查字符串的语言

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