The following character sequences are recognized:
-
. matches any single character except
newline
-
* (postfix) matches the previous expression
zero, one or several times
-
+ (postfix) matches the previous expression
one or several times
[+] matches a "+" character (escape mechanism)
-
? (postfix) matches the previous expression
once or not at all
-
[ ] is a character set
-
ranges are denoted with a hyphen "
- ",
as in [a-z]
-
an initial caret "
^ ", as in [^0-9] ,
complements the set (i.e., any character, except a lowercase letter from a to z, is accepted)
[[] matches a "[" character (escape mechanism)
[]] matches a "]" character (escape mechanism)
^ matches at beginning of line
$ matches at end of line
| (infix) alternative between two expressions
-
( ) grouping of the enclosed expression
[(] matches a "(" character (escape mechanism)
[)] matches a ")" character (escape mechanism)
-
\ escapes special characters (i.e.,
^.[$|*?{' ):
\n matches a newline character
\. matches a dot "." character
\' matches a quote "' " character
-
\ cannot be escaped; to search for
a backslash, use . to match any single
character
|
|
|