Using Wildcards
You can use wildcards to narrow any search, set the type of information displayed in a window, such as the
Database Navigator, or specify a name of an object in a dialog box.
Listing of Wildcards
This character: | Matches: |
|---|
* (asterisk) | Zero or more characters |
? | Any single character |
[ab] | Any one of the characters in the brackets |
[^ab] | Any character other than the characters following the caret symbol (^) in the brackets |
[a-c] | Any one character in a range enclosed in brackets |
{ab, bc} | Any of the character strings in the braces |
Tips on Entering Wildcards
Here are some tips for entering wildcards:
■Case is insignificant so xYz is the same as XYz.
■You can match alternative sequences of characters by enclosing them in braces and separating them with commas. For example, the pattern a{ab,bc,cd}x matches aabx, abcx, and acdx.
■You can form character sets that match a single character using brackets [ ]. For example, [abc]d matches ad, bd, and cd.
■You can use a dash (-) to create ranges of characters. For example, [a-f1-4] is the same as [abcdef1234].
■You can use a backslash (\) to include a special character as part of the character set. For example, [ab\]cd] includes the five characters a, b, ], c, and d.
Here are some examples of more complex patterns and possible matches:
■x*y - Matches any object whose name starts with x and ends with y. This would include xy, x1y, and xaby.
■x??y - Matches only those objects with four-character long names that start with x and end with y. This would include xaay, xaby, and xrqy.
■x?y* - Matches all of those objects whose names start with x and have y as the third character. This would include xayee, xyy, and xxya.
■*{aa,ee,ii,oo,uu}* - Matches all those objects whose name contains the same vowel twice in a row. This would include loops and skiing.
■[aeiou]*[0-9] - Matches any object whose name starts with a vowel and ends with a digit. This would include eagle10, arapahoe9, and ex29.
■[^aeiou]?[xyz]* - Matches any object whose name does not start with a vowel and has x, y, or z as the third letter. This would include thx1138, rex, and fizzy