From Wikipedia, the free encyclopedia - View original article
The term wildcard character has several meanings.
When specifying file names (or paths) in CP/M, DOS, Microsoft Windows, and Unix-like operating systems, the asterisk pattern character ("*", also called "star") matches zero or more characters. In Unix-like and DOS operating systems, the question mark ("?") matches exactly one character; in DOS, it will also match missing (zero) trailing characters. For example, in DOS, the pattern
123??? will match
12313, but not
1239919991. In Unix shells and Windows PowerShell, ranges of characters enclosed in square brackets ("[" and "]") match a single character within the range; for example,
[A-Za-z] matches any single uppercase or lowercase letter. Unix shells allow negation of the specified character set by using a leading "!" (e.g.,
foo.[!ch], which will match names like
foo.o). Matching wildcard patterns to multiple file or path names is referred to as globbing.
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Transact-SQL also supports square brackets ("[" and "]") to list sets and ranges of characters to match, a leading caret (^) matches only a character not specified within the brackets. In Microsoft Access, wildcard characters can be used in "LIKE" expressions; the asterisk sign (*) matches zero or more characters, and the question mark (?) matches a single character.