public static boolean isPhone ( String value ) { String telcheck = "^\\d{3,4}-?\\d{7,9}$" ; String mobilecheck = "^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\\d{8})$" ; return match ( telcheck , Pattern . CASE_INSENSITIVE , value ) || match ( mobilecheck , Pattern . CASE_INSENSITIVE , value ) ; }
Telephone number including mobile phones and landlines