php commonly used in regular expressions

Check that only alphanumeric characters

if(!preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9]+$/u",$string)) {
	echo '不满足条件';
}

Guess you like

Origin blog.csdn.net/qq_42216575/article/details/90030413