quick question, which grep allows you to use \d? as far as I know, only GNU grep with -P option (PCRE) will allow it, otherwise you have to use [0-9] or the POSIX character set [:digit:] inside a character class
also, ERE is enabled using -E not -e, from GNU grep's man page:
-e PATTERNS, --regexp=PATTERNS
Use PATTERNS as the patterns. If this option is used multiple times or is combined with the -f
(--file) option, search for all patterns given. This option can be used to protect a pattern beginning
with “-”.
-E, --extended-regexp
Interpret PATTERNS as extended regular expressions (EREs, see below).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
quick question, which
grep
allows you to use\d
? as far as I know, only GNU grep with-P
option (PCRE) will allow it, otherwise you have to use[0-9]
or the POSIX character set[:digit:]
inside a character classalso, ERE is enabled using
-E
not-e
, from GNU grep's man page: