package util import "regexp" // 识别手机号码 func IsMobile(mobile string) bool { result, _ := regexp.MatchString(`^(1[0-9][0-9]\d{4,8})$`, mobile) if result { return true } else { return false } }