此示例仅为自身匹配汉字所遇到的情形,其他诸如字母数字等的匹配,可进行学习。 ^[\u4e00-\u9fa5]*$ ^:正则开头 $:正则结尾 转载于:https://www.cnblogs.com/sunjie-one/p/9552660.html