公告板
版本库
filestore
活动
搜索
登录
Android
/
Security_guest_portrait_rk3399_outdoor
竖屏rk3399室外机
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
a
554325746@qq.com
2020-01-10
ce0902f1721b9de6c0a2e8b16cdb6be2c6bca2b3
[Android/Security_guest_portrait_rk3399_outdoor.git]
/
app
/
src
/
main
/
java
/
com
/
basic
/
security
/
utils
/
PhoneNumberCheckUtils.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.basic.security.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PhoneNumberCheckUtils {
public static boolean isPhone(String phone) {
String regex = "^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0,1,3,5,6,7,8])|(18[0-9])|(19[8|9]))\\d{8}$";
if (phone.length() != 11) {
return false;
} else {
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(phone);
return m.matches();
}
}
}