public static void test2() {
String str = "张三:13539558064,李四:15626829748,赵六:13718952204";
Pattern p = Pattern.compile("1[345678]\\d{9}");
Matcher m = p.matcher(str);
while(m.find()) {
System.out.println(m.group());
}
}
原文地址:https://www.cnblogs.com/M87-A/p/12010026.html
时间: 2024-10-11 02:22:37