Java tutorial
//package com.java2s; public class Main { public static boolean isActionPhone(String str) { if (isEmpty(str)) return false; return str.matches("^1[0-9]{10}$"); } public static boolean isEmpty(String str) { if (str == null) return true; str = str.trim(); if (str.length() == 0) return true; return false; } }