package util import "regexp" func IsEmailAddr(email string) bool { pattern := `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` reg := regexp.MustCompile(pattern) return reg.MatchString(email) }
最后更新于1年前
这有帮助吗?