PHP 判断字符串只包含英文中文数字的正则表达式

2011-10-02 , PHP   Tags: ,

function isNickname($str){
return preg_match(“/^[\x{4e00}-\x{9fa5}A-Za-z0-9_]+$/u”,$str);
}