In the previous examples, regular expressions are constructed with literal characters that match themselves. There are other characters in regex syntax that match in a more generalized way. These are called "metacharacters". Metacharacters do not match themselves, but rather perform a specific task when used in a regular expression. One such metacharacter is the dot ".", or wildcard. When used in a regular expression, the wildcard can match any single character.
Example 1: Search for the string "ubject".
.ubject:
Subject: subject: Fubject:
Subject subject
Example 2: Use three dots "..." to search for any three characters within a string.
t...s
trees tEENs t345s t-4-s
Trees twentys t1234s
Example 3: Use several wildcards to match characters throughout a string.
.a.a.a
Canada alabama banana 3a4a5a
aaa