That is a very interesting answer and shouldn't work at all because rclone filter strings are file globs not regexps.
However it does work...
I think the reason it works is actually a bug. Rclone translates the filters into regular expressions (you can see them with -vv --dump filters
), but it is dumping the \d
straight into the regexp which it shouldn't be - it should be escaping the \
..
This means that any of the regexp \
chars will work in the glob which wasn't unintended certainly!
So I should probably either document this or fix it....
(I keep meaning to make an alternate syntax which can be a regexp for filters - my best idea for not breaking too much stuff is to allow regexp in the --filter
family of commands, so instead of writing --filter + blah
you'd write --filter r+ .*\d{5}
)