broot
broot copied to clipboard
Regex escape sequences require one extra backslash
I don't know whether this is the intended behavior, but I find it strange and confusing: regex search patterns require a double backslash to enter metacharacters and character classes.
For instance:
-
r/\\(
instead ofr/\(
, -
r/\\d
instead ofr/\d
, -
r/\\W
instead ofr/\W
, - etc..
It's as if a single backslash on its own gets discarded: for instance r/\\.\t\x\t\$
will find files with a .txt
extension.