求一个Java匹配中文字符的正则表达式?在线等
------解决方案--------------------
[/u4e00-/u9fa5]
------解决方案--------------------
- Java code
String s = "中国"; Pattern p = Pattern.compile("[\u4e00-\u9fa5]"); Matcher m = p.matcher(s); while(m.find()){ System.out.println(m.group()); }