Java tutorial
//package com.java2s; //License from project: Apache License import android.text.TextUtils; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isMobile(String mobile) { Matcher localMatcher = Pattern.compile("^1[3-8]+\\d{9}$").matcher(mobile); if ((!TextUtils.isEmpty(mobile)) && (localMatcher.matches())) { return true; } return false; } }