首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

判断是不是是手机

2012-07-19 
判断是否是手机/** * 判断是否是手机 * @param tel 电话号码 * @author chitianxiang $Feb 4th, 2012 */st

判断是否是手机

/** * 判断是否是手机 * @param tel 电话号码 * @author chitianxiang $Feb 4th, 2012 */static private boolean isMobile(String tel) {boolean matchFlag = false;if (null != tel && !"".equals(tel)) {//手机号码,以1开始,13,15,18,19,为合法,后跟9位数字String regEx="[1]{1}[3,5,8,6]{1}[0-9]{9}";matchFlag = Pattern.compile(regEx).matcher(tel).find();}return matchFlag;}
?

热点排行