正则表达式:判断一个词是否全是汉字

if (preg_match("/^[\x{4e00}-\x{9fa5}]+$/u",$str)) {
			return true;
} 

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.