regexp - skynocover/Wiki-for-GoLang GitHub Wiki
regexp
import
import (
"regexp"
)
密碼
match1, _ := regexp.MatchString("[a-z]+", user.Password) //小寫英文
match2, _ := regexp.MatchString("[A-Z]+", user.Password) //大寫英文
match3, _ := regexp.MatchString("[0-9]+", user.Password) //數字
match4, _ := regexp.MatchString("[^a-zA-Z0-9]+", user.Password) //特殊符號