mirror of
https://github.com/XShengTech/MEGREZ.git
synced 2026-01-13 16:47:16 +08:00
[Fix] 🐛 Fix Regexp Pattern to Support subdomain Email #15
This commit is contained in:
parent
13bd350274
commit
81b52e80b5
@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
func EmailFormat(email string) bool {
|
||||
pattern := `^\w+(-+.\w+)*@\w+(-.\w+)*.\w+(-.\w+)*$`
|
||||
pattern := `\w[-\w.+]*@([-A-Za-z0-9]+\.)+[A-Za-z]{2,14}`
|
||||
match, err := regexp.MatchString(pattern, email)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user