On wikipedia you can read the following definition of a wildcard:
In software, a wildcard character is a single character, such as an asterisk
* ,
used to represent a number of characters or an empty string.
It is often used in file searches so the full name need not be typed.
This definition still holds for regexes, but the syntaxis is a bit different. The wildcard character in regexes is the
So we could make the following definition of a wildcard in regexes:
A wildcard in regexes, such as the dot
Regexes offer an extensive set of wildcards beside the dot (please only focus on the left part of the table for now):
Matches anything, except the newline character. | ||
Matches any digit. | Equal to |
|
Matches any non-digit. | Equal to |
|
Matches any whitespace. | Equal to |
|
Matches any non-whitespace. | Equal to |
|
Matches any alphanumeric char. | Equal to |
|
Matches any non-alphanumeric char. | Equal to |