fix: regex cpature NVR
Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
This commit is contained in:
parent
6669e5b3b8
commit
4e40d33b25
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"source": "csaf",
|
"source": "csaf",
|
||||||
"target": "cusas"
|
"target": "cusa"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,11 @@ pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref NVR_RE: Regex =
|
pub static ref NVR_RE: Regex = Regex::new(
|
||||||
Regex::new(r"^([a-zA-Z0-9\-_]+)-([0-9a-zA-Z\._]+)-([0-9a-zA-Z\._]+)").unwrap();
|
// %{name}-%{version}-%{release}.[oexxxx.xxx.rpm]
|
||||||
|
r"^([a-zA-Z0-9\-_+]+)-([0-9a-zA-Z\._+]+)-([0-9a-zA-Z\._-]+).(oe[0-9a-z]+.[0-9a-z]+.rpm)"
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cumain() -> Result<()> {
|
pub fn cumain() -> Result<()> {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user