From 74a2c97e25df1ccce5acc87ed4faac2abf6f0d14 Mon Sep 17 00:00:00 2001 From: Kirtana Ashok Date: Thu, 21 Mar 2024 11:11:00 -0700 Subject: [PATCH] Tighten the regex Signed-off-by: Kirtana Ashok --- platforms.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms.go b/platforms.go index cc613fa..96d5f8c 100644 --- a/platforms.go +++ b/platforms.go @@ -121,7 +121,8 @@ import ( ) var ( - specifierRe = regexp.MustCompile(`^[()A-Za-z0-9_.-]+$`) + //specifierRe = regexp.MustCompile(`^[()A-Za-z0-9_.-]+$`) + specifierRe = regexp.MustCompile(`^[A-Za-z0-9_-]+(\([A-Za-z0-9_.-]*\))?$`) OSAndVersionFormat = "%s(%s)" )