/*** Verify whether it is a China Telecom Mobile Phone Number * @ author liubin **/public class checkphonenumber {/** the country number segment is allocated as follows: Mobile: 134, 135, 136, 137, 138, 139, 150, 151, 157 (TD), 158, 159, 187, 188, Unicom: 130, 131, 132, 152, 155, 156, 185, 186 Telecom: 133, 153, 180, 189 * // match mobile phone number // public static string str1 = "^ 1 (3 [4-9] | 5 [01789] | 8 [78]) \ D {8} $ "; // match the mobile phone number // public static string str2 = "^ 1 (3 [0-2] | 5 [256] | 8 [56]) \ D {8} $ "; // matches the public static string STR =" ^ (18 [09] | 1 [35] 3 )\ \ D {8} $ ";/*** verify a single number * @ Param Number * @ return */public static Boolean isphonenumber (string number) {pattern P = pattern. compile (STR); matcher M = P. matcher (number); Return M. matches ();}/*** verify the batch number * @ Param list * @ return */public static Boolean isphonenumberall (string [] list) {pattern P = pattern. compile (STR); For (string: List) {If (string. length ()! = 11) return false; matcher M = P. matcher (string); If (! M. Matches () {return false ;}} return true ;}}