From d4e3e4cae7d65ed5b8178f4cc666044f29c25f06 Mon Sep 17 00:00:00 2001 From: Sander van Harmelen Date: Tue, 6 Oct 2015 14:49:16 +0200 Subject: [PATCH] Fix regexp --- builtin/providers/cloudstack/resources.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/cloudstack/resources.go b/builtin/providers/cloudstack/resources.go index 53e017b14..f7115e793 100644 --- a/builtin/providers/cloudstack/resources.go +++ b/builtin/providers/cloudstack/resources.go @@ -121,7 +121,7 @@ func retrieveTemplateID(cs *cloudstack.CloudStackClient, zoneid, value string) ( // ID can be either a UUID or a UnlimitedResourceID func isID(id string) bool { - re := regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1$`) + re := regexp.MustCompile(`^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1)$`) return re.MatchString(id) }