diff --git a/zh/04.2.md b/zh/04.2.md index 95829119e6cc0c2ef4454ca32c74fa206e1ef6e1..e54ce13f38338c94c280aeab621213edcbeb2fff 100644 --- a/zh/04.2.md +++ b/zh/04.2.md @@ -64,7 +64,7 @@ if m, _ := regexp.MatchString("^[a-zA-Z]+$", r.Form.Get("engname")); !m { 你想知道用户输入的一个Email地址是否正确,通过如下这个方式可以验证: ```Go -if m, _ := regexp.MatchString(`^([\w\.\_]{2,10})@(\w{1,}).([a-z]{2,4})$`, r.Form.Get("email")); !m { +if m, _ := regexp.MatchString(`^([\w\.\_]{2,10})@(\w{1,})\.([a-z]{2,4})$`, r.Form.Get("email")); !m { fmt.Println("no") }else{ fmt.Println("yes")