Regular expression meta-character set
^ Anchoring the beginning of a line, such as matching lines starting with ABC ' ^ABC '
$ anchor Line endings, such as matching lines ending with xyz ' xyz$ '
. Match an arbitrary character, such as ' AB.C ' matches with AB beginning with any one character in the middle of the C end
* Match 0 or more * preceding characters, such as ' abc*d ' match with AB beginning with D end Middle has at least one C
[] matches a specified range of characters, such as ' a[bc]d ' matches a beginning D ending, a middle character is B or c,abd or ACD, such as ' a[0-9]b ' matches a starts with a B ending, a number in the middle
[^] matches characters outside the specified range, such as ' a[^bc]d ' matches with a D ending with a, middle character neither B nor C
\< anchor words, such as ' \<abc ' matches lines of words starting with ABC
\> anchor ending, such as ' xyz\> ' matches lines of words ending with XYZ
X\{m\} matches characters x,m times, as ' a\{3\} ' matches rows of 3 consecutive a
X\{m,\} matches a character x, at least m times, such as ' a\{3,\} ' matches a row of at least 3 consecutive a
X\{m,n\} matches character X, at least m times, up to n times, such as ' a\{2,5\} ' matches rows of at least 2 consecutive a at most 5 a
. * matches any character
\(.. \) tag matching characters, such as ' \ (love\) ', Love is marked as 1
POSIX identity Character Set
[: Alnum:]: Letters or numbers
[:d igit:]: Numeric characters
[:p UNCT:]: Punctuation
[: Alpha:]: Alphabetic character
[: Graph:]: non-whitespace character
[: Space:]: space character
[: Blank:]: Spaces and tabs
[: Lower:]: lowercase letters
[: Upper:]: Uppercase
[: Cntrl:]: Control character
[:p rint:]: Print characters
Regular expressions and POSIX identity character sets