aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-11-01 16:49:03 +0900
committerAstatin <[email protected]>2024-11-01 16:49:03 +0900
commitdc89fa71b45eedbe1b69602b7bcfb8c7b309498f (patch)
tree2d236fd0bc6ce2e3f572a4601ccbbe3e6a24da6a
parent9a6b5ab73a025401d2dd83533a0d103fb5d13dc2 (diff)
Fix special characters regex
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
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",