Summary of Pattern Elements
Element Meaning
- ^
Matches the null string at the beginning of a line.
However, if not the first
element of a pattern, is treated as a
literal caret.
- .
Matches any single character other than newline.
- $
Matches the newline character at the end of a line.
However, if not the last
element of a pattern, is treated as a literal dollar sign.
- [<ccl>]
Matches any single character that is a member of the set
specified by <ccl>.
<Ccl> may be composed of single characters
or of character ranges of the form <c1>-<c2>.
If character ranges are used, <c1> and <c2> must both belong
to the digits, the upper case alphabet or the lower case alphabet.
- [^<ccl>]
Matches any single character that is not
a member of the set specified by <ccl>.
- *
In combination with the immediately preceding pattern element,
matches zero or more characters that are matched by that
pattern element.