Say I have 3 files and I want to exclude 2 of them from find.
/tmp/test/c
/tmp/test/a
/tmp/test/b
# works
find /tmp/test -type f -not -regex "/tmp/test/\(a\|b\)"
# does not work
find /tmp/test -type f -not -regex "/tmp/test/(a|b)"
Single or double quote do not seem to matter here.
Why is this the case? I would think no escaping is needed, as shell does not touch the regex as the regex is in quotes.