Comment by alwaysbeconsing

3 years ago

GNU and BSD grep both default to "basic" regular expressions and both have the `-E` switch to use "extended" expressions.

Last time I used macOS (which was 6 years ago) there was no extended expressions, or the regex syntax was limited. I forget (again, haven't used an apple product in years)

  • It's not necessary to install a suite of commands if you want updated grep.

    Just use Homebrew and you can install different versions of grep, including GNU's:

        brew install grep

    • Sure but with this you get all the other improved core utils like sed, etc. GNU utils just blow BSD/macOS out of the water. Personally, macOS seems to me like a half baked development platform in general

      1 reply →