public static void main(String[] args) {
        String s = "我的手机号码是18988888888,曾经用过18987654321,还用过18812345678";
        String regex = "1[3578]\\d{9}";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(s);
        while (m.find()) {
            System.out.println(m.group());
        }
    }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-28
  • 2021-10-03
  • 2021-11-04
  • 2021-12-12
  • 2021-11-10
相关资源
相似解决方案