From 80bbe2ac05c0c2226dec39ff487f3c78b32a9ffa Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 6 Apr 2021 16:03:15 +0300 Subject: [PATCH] update regex pattern --- get-new-tool-versions/parsers/go-parser.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-new-tool-versions/parsers/go-parser.psm1 b/get-new-tool-versions/parsers/go-parser.psm1 index 19f3a21..5b9abb0 100644 --- a/get-new-tool-versions/parsers/go-parser.psm1 +++ b/get-new-tool-versions/parsers/go-parser.psm1 @@ -15,7 +15,7 @@ class GoVersionsParser: BaseVersionsParser { hidden [SemVer] FormatVersion([string]$VersionSpec) { $cleanVersion = $VersionSpec -replace "^go", "" - $semanticVersion = $cleanVersion -replace "(\d+\.\d+\.?\d+?)((?:alpha|beta|rc))(\d*)",'$1-$2.$3' + $semanticVersion = $cleanVersion -replace '(\d+\.\d+\.?\d*?)((?:alpha|beta|rc))(\d*)', '$1-$2.$3' return [SemVer]$semanticVersion }