Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 1, 2020 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/fccbe3d8f4ec99d1eecfd30c880bca46 to your computer and use it in GitHub Desktop.
Save parzibyte/fccbe3d8f4ec99d1eecfd30c880bca46 to your computer and use it in GitHub Desktop.
expresionRegular := regexp.MustCompile(`^https?:\/\/([\w-]+\.)?parzibyte\.me$`)
subdominioPrueba := "https://blog.parzibyte.me"
if expresionRegular.Match([]byte(subdominioPrueba)) {
fmt.Println("Coincide")
} else {
fmt.Println("NO coincide")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment