Java tutorial
//package com.java2s; import java.util.regex.Pattern; public class Main { public static boolean isMobile(String phoneNum) { if (phoneNum == null) return false; return validation("^[1][3,4,5,7,8][0-9]{9}$", phoneNum.replace("+86", "")); } public static boolean validation(String pattern, String str) { if (str == null) return false; return Pattern.compile(pattern).matcher(str).matches(); } }