Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.text.TextUtils;

public class Main {
    public static boolean isMobiPhoneNumber(String telNum) {
        if (TextUtils.isEmpty(telNum)) {
            return false;
        }
        telNum = telNum.replaceAll("^\\+{0,1}86", "");

        return telNum.matches("^((13[0-9])|(15[0-9])|(17[0-9]))|(18[0-9]))\\d{8}$");
    }
}