Skip to content

Commit

Permalink
Proper NVR matching
Browse files Browse the repository at this point in the history
  • Loading branch information
mstg committed Nov 6, 2022
1 parent 2a2b10b commit 29778c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/rpmutils/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ package rpmutils

import "regexp"

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

0 comments on commit 29778c7

Please sign in to comment.