Wildcard character

From Vero - Wikipedia
Revision as of 18:30, 17 October 2025 by imported>Dgpop (File and directory patterns: Atari DOS supports "*" and "?" as well.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:For Template:One source

In software, a wildcard character is a kind of placeholder represented by a single character, such as an asterisk (Template:Code), 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.<ref>Template:Cite web</ref>

Telecommunication

In telecommunications, a wildcard is a character that may be substituted for any of a defined subset of all possible characters.

Computing

In computer (software) technology, a wildcard is a symbol used to replace or represent zero or more characters.<ref>Template:Cite news</ref> Algorithms for matching wildcards have been developed in a number of recursive and non-recursive varieties.<ref>Template:Cite web</ref>

File and directory patterns

When specifying file names (or paths) in CP/M, Atari DOS, MS-DOS, Windows, and Unix-like operating systems, the asterisk character (Template:Code, also called "star") matches zero or more characters. For example, Template:Code matches Template:Code and Template:Code but not Template:Code. If files are named with a date stamp, wildcards can be used to match date ranges, such as {{#time:Ym}}*.mp4 to select video recordings from {{#time:F}} {{#time:Y}}, to facilitate file operations such as copying and moving.

In Unix-like operating systems, MS-DOS, and Atari DOS, the question mark Template:Code matches exactly one character. In MS-DOS, if the question mark is placed at the end of the word, it will also match missing (zero) trailing characters; for example, the pattern Template:Code will match Template:Code and Template:Code, but not Template:Code.

In Unix shells and Windows PowerShell, ranges of characters enclosed in square brackets (Template:Code and Template:Code) match a single character within the set; for example, Template:Code matches any single uppercase or lowercase letter. In Unix shells, a leading exclamation mark Template:Code negates the set and matches only a character not within the list. In shells that interpret Template:Code as a history substitution, a leading caret Template:Code 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 Template:Code matches zero or more characters, and underscore Template:Code a single character. Transact-SQL also supports square brackets (Template:Code and Template:Code) to list sets and ranges of characters to match, a leading caret Template:Code negates the set and matches only a character not within the list. In Microsoft Access, the asterisk sign Template:Code matches zero or more characters, the question mark Template:Code matches a single character, the number sign Template:Code matches a single digit (0–9), and square brackets can be used for sets or ranges of characters to match.

Regular expressions

In regular expressions, the period (Template:Code, also called "dot") is the wildcard pattern which matches any single character. Followed by the Kleene star operator, which is denoted as an asterisk (Template:Code), we obtain Template:Code, which will match zero or more arbitrary characters.

Search engines

The wildcard operator can be used in Google Search to fetch results which have one or more word(s) inserted between phrases; e.g. Googling "I love * so much" will populate results such as "I love this game so much," "I love my wife so much," etc.<ref>Template:Cite web</ref>

See also

References

<references />