Skip to content

Commit a83d24a

Browse files
committed
expr: Handle '$' at the end of an alternative pattern
1 parent 16bc36b commit a83d24a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/uu/expr/src/syntax_tree.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ impl StringOp {
188188
match pattern_chars.peek() {
189189
// End of a capturing group
190190
Some(')') => re_string.push('$'),
191+
// End of an alternative pattern
192+
Some('|') => re_string.push('$'),
191193
_ => re_string.push_str(r"\$"),
192194
}
193195
re_string.push(backslash);

0 commit comments

Comments
 (0)