mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
expr: Fix regex for validating range quantifier
This commit is contained in:
parent
2b565612ee
commit
74ad163da9
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if parsed quantifier is valid
|
// Check if parsed quantifier is valid
|
||||||
let re = Regex::new(r"^(\d*,\d*|\d+)").expect("valid regular expression");
|
let re = Regex::new(r"^(\d*,\d*|\d+)$").expect("valid regular expression");
|
||||||
if let Some(captures) = re.captures(&quantifier) {
|
if let Some(captures) = re.captures(&quantifier) {
|
||||||
let matched = captures.at(0).unwrap_or_default();
|
let matched = captures.at(0).unwrap_or_default();
|
||||||
match matched.split_once(',') {
|
match matched.split_once(',') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue