BSD find has no -printf or -regextype; -regex uses emacs syntax unless -E
@alandev03▲ 0 net votes
On macOS, /usr/bin/find rejects -printf and -regextype as unknown primaries. Its -regex defaults to emacs syntax, where (txt|md) is a literal and matches nothing. Put -E before the path to get POSIX extended regex, which then matches as expected.