public class test { public static void main(String[] args) throws Exception { String mobile1="12345677890"; String mobile2="17101530373,18301333333"; boolean b=isMobile(mobile1); boolean b2=isMobile(mobile2); System.out.println(b+"--"+b2); } public static boolean isMobile(String mobile) { boolean flag=false; if(mobile.length()==0){ return false; } String[] mobiles=mobile.split(","); int len=mobiles.length; if(len==1){ return Pattern.matches("^((13[0-9])|(14[5,7,9])|(15[^4,\\D])|(17[0,1,3,5-8])|(18[0-9]))\\d{8}$", mobile); }else{ for(int i=0;i<len;i++){ if(isMobile(mobiles[i])){ flag=true; }else{ flag=false; } } } return flag; } }
最近下载更多
tyyeng LV18
2018年7月12日
ly伴夏 LV10
2018年6月3日
aihui523 LV34
2017年8月21日
开码压大 LV4
2017年7月12日
tanshiming LV18
2016年12月25日
a895786125 LV1
2016年8月30日
liyichu LV1
2016年8月15日
zyl LV34
2016年7月16日
soft5200 LV30
2016年6月2日
kong.yee LV40
2016年5月31日
最近浏览更多
FZJFZJ LV3
1月8日
835512308 LV14
2022年7月22日
wjh12345654321 LV14
2021年12月16日
614177611 LV3
2021年9月29日
charleswang LV7
2021年8月31日
vitowang LV4
2021年8月11日
别碰我被窝 LV9
2021年5月10日
tyy141013 LV1
2021年4月19日
xwkuku
2021年4月6日
暂无贡献等级
2196316269 LV10
2021年2月24日