add ^ as a character for release tag

This commit is contained in:
Louis Abel 2024-04-24 13:49:44 -07:00
parent 6bcd4a3060
commit 0c5227c146
Signed by: label
GPG Key ID: 3331F061D1D9990E
1 changed files with 3 additions and 2 deletions

View File

@ -31,8 +31,9 @@
package rpmutils package rpmutils
import ( import (
"github.com/rocky-linux/srpmproc/pkg/rpmutils"
"regexp" "regexp"
"github.com/rocky-linux/srpmproc/pkg/rpmutils"
) )
var ( var (
@ -48,7 +49,7 @@ var (
func NVR() *regexp.Regexp { func NVR() *regexp.Regexp {
if nvr == nil { if nvr == nil {
nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+(?:\\.[\\w~%+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$") nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+(?:\\.[\\w~%+^]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$")
} }
return nvr return nvr
} }