Fix regexp

This commit is contained in:
Sander van Harmelen 2015-10-06 14:49:16 +02:00
parent 350b8e2df2
commit d4e3e4cae7
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}