3

Android 正则判断手机号(包含网络运营商)

 2 years ago
source link: https://www.kymjs.com/note/2018/09/12/01/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Android 正则判断手机号(包含网络运营商)

2018-09-12 By 张涛 | 本文已被访问559次

版权声明: 本文是开源实验室原创文章,如您转载必须以链接形式注明原文地址:https://kymjs.com/note/2018/09/12/01
对本知识点有任何问题,可加我的个人微信:kymjs123
public static boolean isMatchered(CharSequence num) {
    Pattern pattern = Pattern.compile("^(1[0-9][0-9])\\d{8}$");
    Matcher matcher = pattern.matcher(num);
    return matcher.find();
}

了解更多有深度技术的文章,与移动端、大前端未来方向的认知,前往订阅 开源实验室小专栏。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK