Java 正则表达式使用例子记录
前言
此篇博客用来记录一些常用的正则表达式
判断是否是全汉字
/**
* 判断是否是全中文汉字
*
* @param str
* @return
*/
public static boolean isChinese(String str) {
String pattern = "[\u4e00-\u9fa5]*";
if (str == null || str.isEmpty()) {
return false;
}
return str.matches(pattern);
} 相关推荐
flyingssky 2020-08-18
wangzhaotongalex 2020-10-20
wyq 2020-11-11
TLROJE 2020-10-26
风雨断肠人 2020-10-13
duanqingfeng 2020-09-29
rechanel 2020-11-16
luofuIT成长记录 2020-09-22
phphub 2020-09-10
taomengxing 2020-09-07
MaggieRose 2020-08-19
山水沐光 2020-08-18
jyj00 2020-08-15
AHuqihua 2020-08-09
山水沐光 2020-08-03