Article 26.4 gives a tutorial introduction to regular expressions. This article is intended for those of you who just need a quick listing of regular expression syntax as a refresher from time to time. It also includes some simple examples. The characters in Table 26.6 have special meaning only in search patterns.
The characters in Table 26.7 have special meaning only in replacement patterns.
When used with grep
, regular expressions
are surrounded by quotes. (If the pattern contains a
The following examples show the metacharacters
available to sed
commands begin with a colon.)
A space is marked by ; a TAB is marked by
- from O'Reilly & Associates' UNIX in a Nutshell (SVR4/Solaris)