标签:else code 匹配 color str div nbsp bsp lse
$str = ‘中‘; if (preg_match(‘/^[\x{4e00}-\x{9fa5}]+$/u‘,$str)){ echo ‘中文‘; } else { echo ‘no‘; }
正则匹配中文
原文地址:https://www.cnblogs.com/pansidong/p/11457957.html