1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

expr: Remove redundant escaping of '*' character

This commit is contained in:
Teemu Pätsi 2025-05-26 16:50:08 +03:00
parent aae62072d8
commit 4ee93ed6d8
No known key found for this signature in database

View file

@ -160,7 +160,6 @@ impl StringOp {
let first = pattern_chars.next();
match first {
Some('^') => {} // Start of string anchor is already added
Some('*') => re_string.push_str(r"\*"),
Some('$') if !is_end_of_expression(&pattern_chars) => re_string.push_str(r"\$"),
Some('\\') if right.len() == 1 => return Err(ExprError::TrailingBackslash),
Some(char) => re_string.push(char),