Wildcard Characters
Wildcard Characters
Wildcard Characters
Wildcard characters are special characters that can be used to substitute one or more normal characters when searching for a string.
| Character |
Description and example |
%
|
The percent sign substitutes any zero or more characters. Thus A% would search for all entries starting with A: A1 A23 AB123 ABCDEF AB% returns all entries that start with AB: AB123 ABCDEF %3 finds all items that end in 3: A23 AB123 The percent sign (&) is very similar in function to the asterisk (*) in MS-DOS.
|
_
|
The underscore substitutes any one character. Thus A_ returns all entries that are two characters long start with A: A1 A2 A_1 returns all entries that are three characters long and start with A and end with 1: AB1 A21 The underscore (_) is very similar to the question mark (?) in MS-DOS. |
[]
|
Square brackets are used to define a range or set of characters that should appear in that position. A[A-C]1 returns all entries that are three characters long, start with an A, end with a 1 and the have A, B or C as the second character: AA1 AB1 AC1 Instead of a range, a set of characters can also be specified in square brackets. Thus A[A,C]1 would return all entries that are three characters long, start with an A, end with a 1 and have A or C as the second character: AA1 AC1
|
|