From 17594f1cff73b1862e20423452d12201f5ba1497 Mon Sep 17 00:00:00 2001 From: Morgan Hargrove Date: Wed, 27 Nov 2024 09:17:59 -0700 Subject: [PATCH] [bugfix] Update reDomain to handle uppercase letters --- is/rules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/is/rules.go b/is/rules.go index 3cad215..c6380a4 100644 --- a/is/rules.go +++ b/is/rules.go @@ -246,7 +246,7 @@ var ( // Domain regex source: https://stackoverflow.com/a/7933253 // Slightly modified: Removed 255 max length validation since Go regex does not // support lookarounds. More info: https://stackoverflow.com/a/38935027 - reDomain = regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-z0-9])?\.)+(?:[a-zA-Z]{1,63}| xn--[a-z0-9]{1,59})$`) + reDomain = regexp.MustCompile(`^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{1,63}| xn--[a-z0-9]{1,59})$`) ) func isISBN(value string) bool {