xiyixin
1         String s ="我的QQ是:456456 我的电话是:17123456789 我的邮箱是:aaa123@aaa.com";
2         Pattern p = Pattern.compile("((17\\d)|(18\\d))\\d{8}");
3         Matcher m = p.matcher(s);
4         while (m.find()) {
5             System.out.println(m.group());
6         }

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-22
  • 2021-10-01
  • 2021-04-23
  • 2021-07-15
  • 2021-07-08
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-05
  • 2021-08-11
  • 2022-12-23
  • 2021-08-15
  • 2021-05-22
相关资源
相似解决方案