Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (g - j) grep(1)
[[=e=]fg, [[=è=]fg], and [[=ê=]fg] are each equivalent to [eèêfg].
The - (dash) character loses its special meaning if it occurs rst ([-string]), if
it immediately follows an initial circumex ([ˆ-string]), or if it appears last
([string-]) in the string.
] When the ] (right bracket) is the rst character in the string ([]string])or
when it immediately follows an initial circumex ([ˆ]string]), it is treated as a
part of the string rather than as the string terminator.
\special_character
A \ (backslash) followed by a special pattern-matching character matches the special
character itself (as a literal character). These special pattern-matching characters are
as follows:
.*[\ Always special, except when they appear within [](brackets).
^ Special at the beginning of an entire pattern or when it immediately follows
the left bracket of a pair of brackets ([ˆ...]).
$ Special at the end of an entire pattern.
[: :] A character class name enclosed in bracket-colon delimiters matches any of the set of
characters in the named class. Members of each of the sets are determined by the
current setting of the LC_CTYPE environment variable. The supported classes are
alpha, upper, lower, digit, xdigit, space, print, punct, graph, and cntrl.
Here is an example of how to specify one of these classes:
[[:lower:]]
This matches any lowercase character for the current locale.
Forming Patterns
The following rules describe how to form patterns from REs:
An RE that consists of a single, ordinary character matches that same character in a
string.
An RE followed by an * (asterisk) matches zero or more occurrences of the character
that the RE matches. For example, the following pattern:
ab*cd
matches each of the following strings:
acd
abcd
abbcd
abbbcd
but not the following string:
abd
If there is any choice, the longest matching leftmost string is chosen. For example, given
the following string:
122333444
527188-003 Hewlett-Packard Company 423