手机正则

mac2022-06-30  179

/// <summary> /// 判断输入的字符串是否是一个合法的手机号 /// </summary> /// <param name="input"></param> /// <returns></returns> public static bool IsMobilePhone(string input) { Regex regex = new Regex("^1[34578]\\d{9}$"); return regex.IsMatch(input); }

转载于:https://www.cnblogs.com/blhw/p/6781030.html

相关资源:php 手机号码验证正则表达式

最新回复(0)