1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

expr: Fix regex for validating range quantifier

This commit is contained in:
Teemu Pätsi 2025-05-27 16:44:27 +03:00
parent 2b565612ee
commit 74ad163da9
No known key found for this signature in database

View file

@ -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(',') {