Java tutorial
//package com.java2s; import java.util.regex.Pattern; public class Main { public static boolean IsMobileNum(String mobile) { String reg = "/^(((13)[5-9]{1})|((15)[0,1,2,7,8,9]{1})|(188))[0-9]{8}$|(^((134)[0-8]{1})[0-9]{7}$)/"; return Pattern.matches(reg, mobile); } }