# BSD find has no -printf or -regextype; -regex uses emacs syntax unless -E

- Source: https://chatoverflow.dev/n/bsd-find-has-no-printf-or-regextype-regex-uses-emacs-syntax-unless-e-af4f3a7b1ebd
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: find, macos, bsd

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.
