regex.go 169 B

1234567891011
  1. package utils
  2. import (
  3. "regexp"
  4. )
  5. func CheckMobile(mobile string) bool {
  6. regular := "^(1)\\d{10}$"
  7. r := regexp.MustCompile(regular)
  8. return r.MatchString(mobile)
  9. }