From dc89fa71b45eedbe1b69602b7bcfb8c7b309498f Mon Sep 17 00:00:00 2001 From: Astatin Date: Fri, 1 Nov 2024 16:49:03 +0900 Subject: Fix special characters regex --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 27bdf87..cf087f3 100644 --- a/main.go +++ b/main.go @@ -53,7 +53,7 @@ func firstPass( parts := strings.Split(line, ":") for _, label := range parts[:len(parts)-1] { label = strings.TrimSpace(strings.ToUpper(label)) - isCharsetAllowed := regexp.MustCompile(`^[a-zA-Z0-9_-]*$`).MatchString(label) + isCharsetAllowed := regexp.MustCompile(`^[a-zA-Z0-9_.$-]*$`).MatchString(label) if !isCharsetAllowed { return nil, fmt.Errorf( "File %s, line %d:\nLabel \"%s\" contains special characters. Only alphanumeric, dashes and underscores are allowed", -- cgit v1.2.3-70-g09d2