判断是否是英文
public static boolean isAllChinese(String message) {
return Pattern.compile("[\\u4e00-\\u9fa5]+").matcher(message).matches();
}
public static boolean isAllChinese(String message) {
return Pattern.compile("[\\u4e00-\\u9fa5]+").matcher(message).matches();
}
本文标题:Java 正则记录
本文链接:https://www.haomeiwen.com/subject/tezftrtx.html
网友评论