Wildcard character


In software, a wildcard character is a kind of placeholder represented by a single character, such as an asterisk, which can be interpreted as a number of literal characters or an empty string. It is often used in file searches so the full name need not be typed.

Telecommunication

In telecommunications, a wildcard is a character that may be substituted for any of a defined subset of all possible characters.
In computer technology, a wildcard is a symbol used to replace or represent one or more characters. Algorithms for matching wildcards have been developed in a number of recursive and non-recursive varieties.

File and directory patterns

When specifying file names in CP/M, DOS, Microsoft Windows, and Unix-like operating systems, the asterisk character matches zero or more characters. For example, matches and but not.
In Unix-like and DOS operating systems, the question mark matches exactly one character. In DOS, if the question mark is placed at the end of the word, it will also match missing trailing characters; for example, the pattern will match and, but not.
In Unix shells and Windows PowerShell, ranges of characters enclosed in square brackets match a single character within the set; for example, matches any single uppercase or lowercase letter. In Unix shells, a leading exclamation mark negates the set and matches only a character not within the list. In shells that interpret as a history substitution, a leading caret can be used instead.
The operation of matching of wildcard patterns to multiple file or path names is referred to as globbing.

Databases

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 to list sets and ranges of characters to match, a leading caret negates the set and matches only a character not within the list. In Microsoft Access, the asterisk sign matches zero or more characters, the question mark matches a single character, the number sign matches a single digit, and square brackets can be used for sets or ranges of characters to match.

Regular expressions

In regular expressions, the period is the wildcard pattern which matches any single character. Combined with the asterisk operator it will match any number of any characters.
In this case, the asterisk is also known as the Kleene star.