1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

fix: fix regex isChineseMobileRegexMatcher not work

This commit is contained in:
dudaodong
2022-08-28 20:58:34 +08:00
parent 18b2b6ff7c
commit ef28b52963

View File

@@ -160,7 +160,7 @@ func IsEmail(email string) bool {
return isEmailRegexMatcher.MatchString(email)
}
var isChineseMobileRegexMatcher *regexp.Regexp = regexp.MustCompile(`^((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}$`)
var isChineseMobileRegexMatcher *regexp.Regexp = regexp.MustCompile("^((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}$")
// IsChineseMobile check if the string is chinese mobile number.
func IsChineseMobile(mobileNum string) bool {