"; String rule = "[\u2E80-\u9FFF|\uF900-\uFAFF|\uFF00-\uFFEE]{3,10}";//中文正则 Pattern pattern = Pattern.compile(rule); Matcher m = pattern.matcher(des); while (m.find()) { System.out.println(m.group()); } } void test2() { String num = "1a2b3"; String rule = "\d"; Pattern pattern = Pattern.compile(rule); Matcher m = pattern.matcher(num); while (m.find()) { System.out.println(m.group()); } } public static void main(String[] args) { new ReTest().test1(); }}