From 774f3a8e944836f5370bb4948f0fb1265c4d3614 Mon Sep 17 00:00:00 2001 From: Katoga Date: Thu, 18 Oct 2018 21:34:56 +0200 Subject: [PATCH] GH-37 Fix version parsing regex --- varnish.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/varnish.go b/varnish.go index 7b61edb..de9babb 100644 --- a/varnish.go +++ b/varnish.go @@ -224,7 +224,7 @@ func (v *varnishVersion) queryVersion() error { } func (v *varnishVersion) parseVersion(version string) error { - r := regexp.MustCompile(`(\d)\.?(\d)?\.?(\d)?(?:.*revision\s(.*)\))?`) + r := regexp.MustCompile(`(\d+)\.?(\d+)?\.?(\d+)?(?:.*revision\s(.*)\))?`) parts := r.FindStringSubmatch(version) if len(parts) > 1 { if err := v.set(parts[1:]); err != nil {