From 15c651b73216daaef24d0b09641511d04cde7970 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Wed, 12 Nov 2014 18:06:54 -0800 Subject: [PATCH] Simplify repository name component regexp --- common/names.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/names.go b/common/names.go index ce25e4872..d856467bf 100644 --- a/common/names.go +++ b/common/names.go @@ -7,7 +7,7 @@ import ( // RepositoryNameComponentRegexp restricts registtry path components names to // start with at least two letters or numbers, with following parts able to // separated by one period, dash or underscore. -var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9](?:[a-z0-9]+[._-]?)*[a-z0-9]`) +var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9]{2,}(?:[._-][a-z0-9]+)*`) // RepositoryNameRegexp builds on RepositoryNameComponentRegexp to allow 2 to // 5 path components, separated by a forward slash.