手机号验证 正则表达式

public static boolean isMobile(String str) {   
        Pattern p = null;  
        Matcher m = null;  
        boolean b = false;   
        p = Pattern.compile("^[1][3,4,5,8][0-9]{9}$"); // 验证手机号  
        m = p.matcher(str);  
        b = m.matches();   
        return b;  
    }

 

posted on 2016-08-09 17:00  山高似水深  阅读(349)  评论(0编辑  收藏  举报

购买方式 点击下面图标购买