Android 判断手机号格式是否正确

判断传入值是否是手机号 也可以用来判断手机号格式是否正确

 * 判断是否是手机号
	 */
	public static boolean isPhone(String str) {
		String regex = "^(1)\\d{10}$";//正则表达式
		return str.matches(regex);
	}

猜你喜欢

转载自blog.csdn.net/qq_28643195/article/details/107428526