mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
expr: Fix regex for validating range quantifier
This commit is contained in:
@@ -302,7 +302,7 @@ where
|
||||
}
|
||||
|
||||
// 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) {
|
||||
let matched = captures.at(0).unwrap_or_default();
|
||||
match matched.split_once(',') {
|
||||
|
||||
Reference in New Issue
Block a user