Regular Expression Metacharacters

. (dot)

Any one character

[...] [.-.]

Any one of the characters within the square brackets or within range


Any one of the characters not within the square brackets


Start of line


End of line


Start of word


End of word

| (vertical bar)

Separates two expressions, matches either


Previous character (or group) is optional


One or more of the previous character (or group)


Any number (including none) of the previous character (or group) NOTE: Matches as many as possible

( )

Three uses:
1: Used to enclose a pair of expressions, separated by | (vertical bar - see above)
2: Grouping for quantifiers ('?', '+', and '*' - see above)
3: Carry some text that matches the expression within (see '\1', etc, below)

\1 (and \2, \3, etc)

Output the text 'carried forward' by the brackets (see '( )' above).

\ (backward slant)

Escape character except when as used above.
The character that immediately follows a \ will be interpreted as a literal.