Fix regexp
This commit is contained in:
parent
350b8e2df2
commit
d4e3e4cae7
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue