日期:2014-05-17 浏览次数:20492 次
$pattern = "/^([\x{4e00}-\x{9fa5}]{1,10}
------解决方案--------------------
[a-z]{1,30})$/iu";
$test = array("这是中文","中文and英文","thisisenglish");
foreach($test as $word){
echo $word;
echo " : ";
echo preg_match($pattern,$word);
echo "<br/>";
}