Proper NVR matching

This commit is contained in:
Mustafa Gezen 2022-11-06 04:54:35 +01:00
parent 2a2b10ba10
commit 29778c7ea2
Signed by: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -2,6 +2,5 @@ package rpmutils
import "regexp" import "regexp"
var ( // Nvr is a regular expression that matches a NVR.
Nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+]+)-(\\w+(?:\\.[\\w+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$") var Nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+]+)-(\\w+(?:\\.[\\w+]+)+?)(?:\\.rpm)?$")
)