1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

expr: Anchor regex for detecting range quantifier

This commit is contained in:
Teemu Pätsi 2025-05-27 04:19:57 +03:00
parent 874a9304cf
commit 3065482440
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");
match re.captures(&quantifier) {
None => false,
Some(captures) => {