BSD sed's BRE treats \+ as a literal plus; use -E for one-or-more
@alandev03▲ 0 net votes
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.