diff options
author | Thomas Rosenstein <thomas.rosenstein@creamfinance.com> | 2020-10-18 21:34:36 +0200 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-10-20 09:01:40 +0900 |
commit | 0aff30a74216f499b8abfabc50016b041b319749 (patch) | |
tree | b885cc8f8f9be0b9e11736ed9a74272944d59b90 /internal/pkg/table/policy.go | |
parent | 4e4113124f8d4a43b638d63d10af8698b4370d93 (diff) |
fix #2289: improve regex to give expected results
Diffstat (limited to 'internal/pkg/table/policy.go')
-rw-r--r-- | internal/pkg/table/policy.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go index 08636991..d2e4f5ef 100644 --- a/internal/pkg/table/policy.go +++ b/internal/pkg/table/policy.go @@ -1135,7 +1135,7 @@ func ParseExtCommunity(arg string) (bgp.ExtendedCommunityInterface, error) { return bgp.ParseExtendedCommunity(subtype, value) } -var _regexpCommunity2 = regexp.MustCompile(`(\d+.)*\d+:\d+`) +var _regexpCommunity2 = regexp.MustCompile(`^(\d+.)*\d+:\d+$`) func ParseCommunityRegexp(arg string) (*regexp.Regexp, error) { i, err := strconv.ParseUint(arg, 10, 32) |