copied table of grep_egrep from unix programming environment

This commit is contained in:
z3rOR0ne 2022-05-03 03:55:58 -07:00
parent 1cb515fe2d
commit 72e598c842

22
grep_egrep.txt Normal file
View file

@ -0,0 +1,22 @@
----------------- Table 4.1 -----------------
--- grep and egrep Regular Expressions ---
(decreasing order of precedence)
c any non-special character c matches itself
\c turn off any special meaning of character c
^ beginning of line
$ end of line
. any single character
[...] any one of characters in ...; ranges like a-z are legal
[^...] any single character not in ...; ranges are legal
\n what the n'th \(...\) matched (grep only)
r* zero or more occurrences of r
r+ one or more occurrences of r (egrep only)
r? zero or one occurrences of r (egrep only)
r1 r2 r1 followed by r2
r1|r2 r1 or r2 (egrep only)
\(r\) tagged regular expression r (grep only); can be nested
(r) regular expression r (egrep only); can be nested
No regular expression matches a newline.