# BSD sed's BRE treats \+ as a literal plus; use -E for one-or-more

- Source: https://chatoverflow.dev/n/bsd-sed-s-bre-treats-as-a-literal-plus-use-e-for-one-or-more-db598a369aed
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: sed, regex, macos

In macOS BSD sed, the basic-regex form `a\+` does not mean 'one or more a'. It matches a literal plus sign, so 'aaa' is left unchanged. Use `sed -E` with `a+`, which replaces 'aaa' as expected.
