验证手机号码工具类

news/2024/7/3 6:19:10
/**
 * 验证手机号码(支持国际格式,+86135xxxx...(中国内地),+00852137xxxx...(中国香港))
 * @param mobile 移动、联通、电信运营商的号码段
 *<p>移动的号段:134(0-8)135136137138139147(预计用于TD上网卡)
 *150151152157TD专用)、158159187(未启用)、188TD专用)</p>
 *<p>联通的号段:130131132155156(世界风专用)、185(未启用)、1863g</p>
 *<p>电信的号段:133153180(未启用)、189</p>
 * @return 验证成功返回true,验证失败返回false
 */
public static boolean checkMobile(String mobile) {
    String regex = "(\\+\\d+)?1[3458]\\d{9}$";
    return Pattern.matches(regex,mobile);
}

http://www.niftyadmin.cn/n/3649263.html

相关文章

Android中使用隐藏API图文解析

Android SDK的很多API是隐藏的&#xff0c;我无法直接使用。但是我们通过编译Android系统源码可以得到完整的API。编译Android系统源码后可以在out\target\common\obj\JAVA_LIBRARIES目录可以看到它的所有API。当然对于一般情况&#xff0c;out\target\common\obj\JAVA_LIBRARI…

QTP测试框架之_报表

QTP测试框架之_报表 作者&#xff1a;Wally Yu (微博&#xff1a;http://weibo.com/quicktest) 自己在开发QTP测试框架的时候一些对于报表的经验&#xff1a; Excel报表&#xff1a; 下载Report Manager:http://www.advancedqtp.com/knowl ... ut-reportermanager/ 修改…

git克隆github_如何使用Git和Github分叉,克隆和推送更改

git克隆github介绍 (Introduction) Github is an excellent resource for finding useful code. In order to contribute changes back to a project, you’ll need to make a local copy and then upload your changes. In this tutorial, you’ll fork and clone an existing…

LBS模块架构的封装

对地图进行一个封装 public interface ILbsLayer {/*** 获取地图*/View getMapView();/*** 设置位置变化监听*/void setLocationChangeListener(CommonLocationChangeListener locationChangeListener);/*** 设置定位图标*/void setLocationRes(int res);/*** 添加&#xf…

[收藏]张翼轸:在Outlook的名义下

张翼轸&#xff1a;在Outlook的名义下 -------------------------------------------------------------------------------- http://www.sina.com.cn 2005年03月08日 14:48 ChinaByte   文/张翼轸Plaxo、Teleo、Skype这几个不同的SNS(Social Network Software&#xff0c;…

如何构建和安装Go程序

介绍 (Introduction) So far in our How To Code in Go series, you have used the command go run to automatically compile your source code and run the resulting executable. Although this command is useful for testing your code on the command line, distributing…

如何得到包含隐藏API的Android类库

Android SDK的很多API是隐藏的&#xff0c;我无法直接使用。但是我们通过编译Android系统源码可以得到完整的API库。编译Android系统源码后可以在out\target\common\obj\JAVA_LIBRARIES目录中有它所有API库(java)。当然对于一般情况&#xff0c;out\target\common\obj\JAVA_LIB…

ISO9001:2000和能力成熟度模型的集成

ISO9001:2000和能力成熟度模型的集成 ISO9001:2000and the Capability Maturity ModelIntegration 原作者&#xff1a; Angela Tuffley and Terence P.Rout Software Quality Institute, Griffith University; Mark Stone-Tolcher and Ian Gray, Defence Materiel Organisati…