Wildcards for Regular Expressions (R.E.)

These are a second group of wildcards that can be only with commands that allow regular expression wildcard pattern matching.

SEE ALSO

For more information, see page 502 and page 531

^ indicates start of line but only when found at start of pattern.

$ indicates end of line but only when found at end of pattern.

means exactly one of any character.

[...] means exactly one of the alternatives listed.

[^...] means any one character except for the alternatives listed.

\{n\} means exactly n occurrences of preceding element (supported in grep and sed; not supported in egrep or awk—use {n} for Perl).

\{n,\} means ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.