中文的模式:"[\\u4e00-\\u9fa5]|\\\\u"
例子:
private static final Pattern p = Pattern.compile("[\\u4e00-\\u9fa5]|\\\\u");
Matcher m = p.matcher(str);
if(m.find()){
System.out.println("found!");
}
原文地址:https://www.cnblogs.com/lzmrex/p/9209091.html
时间: 2024-10-07 23:25:52