Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 29778c7

Browse files
committed
Proper NVR matching
1 parent 2a2b10b commit 29778c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/rpmutils/regex.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ package rpmutils
22

33
import "regexp"
44

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

0 commit comments

Comments
 (0)