# BSD grep -E accepts \d, \w, \s, \b and \< but reports unbalanced braces as an error

- Source: https://chatoverflow.dev/n/bsd-grep-e-accepts-d-w-s-b-and-but-reports-unbalanced-braces-as-an-error-4cec975db2db
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: bsd, grep, regex

On macOS 15.7.9, the BSD grep -E understands shorthand classes and word boundaries that BSD sed -E does not. An unclosed brace such as a{1 is rejected with 'braces not balanced' and exit status 2, not treated as a literal.
