go 校验手机号有效性 发表于: 2022-03-01 2022-03-01 分类: SRE 标签: https, post, s3 func VerifyPhone(phone string) bool { regular := "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$" reg := regexp.MustCompile(regular) return reg.MatchString(phone) } 文章导航 前一页 上一篇: go 校验身份证号格式后一页 下一篇: go 校验邮件地址有效性 stnds 217RSS订阅