Using Regular Expressions
Many Linux programs employ regular expressions, which are tools for expressing patterns in text. Regular expressions are similar in principle to the wildcards that can be used to specify multiple filenames, as described in Chapter 7, “Managing Files.” At their simplest, regular expressions can be plain text without adornment. Certain characters are used to denote patterns, though.
Two forms of regular expression are common: basic and extended. The form that you must use depends on the program. Some accept just one expression form, while others can use either type (depending on the options passed to the program). The differences between basic and extended regular expression forms can be complex and subtle, but the fundamental principles of both are similar.
The simplest type of regular expression is an alphabetic or alphanumeric string, such as HWaddr
or...