|
Metacharacter
|
Meaning
|
|
. (period)
|
Matches any one character no matter what the character is
|
|
?
|
Matches the character immediately before it either zero times or one time
|
|
*
|
Matches the character immediately before it any number of times including zero (the character may not be in the string at all)
|
|
+
|
Matches the character immediately before it one or more times (the character must be in the string at least once)
|
|
^
|
Indicates that the characters which follow are at the start of the string only
|
|
$
|
Indicates that the characters which precede it are at the end of the string
|
|
\d
|
Matches any decimal digit
|
|
\D
|
Matches any character that is not a decimal digit
|
|
\s
|
Matches a tab or space character
|
|
\S
|
Matches any character that is not a tab or a space
|
|
\w
|
Matches any letter, any digit, or the underscore character
|
|
\W
|
Matches any character which is not a letter, a digit, or the underscore
|
|
\
|
Escape character allowing the use of any of the metacharacters with their regular keyboard meaning. For instance, \. matches a period (.) in a regular expression. A period (.) matches any one character no matter what the character is.
|