多种方式的正则匹配中文
- 匹配中文字符:[\u4e00-\u9fa5]
- 匹配中文汉字:[\u4e00-\u9fa5]+
- 匹配中文标点符号:[^\u4e00-\u9fa5a-zA-Z0-9]+
- 匹配中文字符和标点符号:[\u4e00-\u9fa5,。、“”‘’;:?!()【】]+
- 匹配含有汉字的字符串:.[\u4e00-\u9fa5]+.
- 匹配中文姓名:^[\u4e00-\u9fa5]{2,}(·[\u4e00-\u9fa5]{2,})*$
- 匹配中文手机号码:^1[3-9]\d{9}$
- 匹配中文邮箱地址:^[\u4e00-\u9fa5a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$
- 匹配中文网址:^((http|https)://)?[\u4e00-\u9fa5a-zA-Z0-9_-]+(.[\u4e00-\u9fa5a-zA-Z0-9_-]+)+(/[\u4e00-\u9fa5a-zA-Z0-9_./-]*)?$
- 匹配中文身份证号码:^[1-9]\d{5}(19|20)\d{2}(0\d|1[0-2])([0-2]\d|3[0-1])\d{3}[\dX]
原文地址: https://www.cveoy.top/t/topic/g0H0 著作权归作者所有。请勿转载和采集!