The grep -P flag enables Perl regex syntax, which includes a lot of useful things like \d for digits. Running man pcresyntax will give them a list of all the nifty things that this includes.
This won't work on the default MacOS (BSD) version of grep, so folks on a Mac do need to make sure they've installed and am using the GNU versions of these tools.
The
grep -P
flag enables Perl regex syntax, which includes a lot of useful things like\d
for digits. Runningman pcresyntax
will give them a list of all the nifty things that this includes.This won't work on the default MacOS (BSD) version of
grep
, so folks on a Mac do need to make sure they've installed and am using the GNU versions of these tools.