Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.regex.Pattern;

public class Main {
    public static boolean matchPhone(String text) {
        if (Pattern.compile("^1(3|4|5|7|8)\\d{9}$").matcher(text).matches()) {
            return true;
        }
        return false;
    }
}