In a shell environment, the term wild cards refers to metacharacters that are then expanded (also referenced as globbed) into a series of file names.
See glob for a Tcl function which provides some wild card expansion.
Someone new to the concept may ask What is the difference between wild cards and regular expressions? Wild cards (aka globs) are designed to match files. The Unix variety of wild cards made 3 changes to regular expressions to make this matching more natural:
One concept that is sometimes hard for people to grasp is that wild cards are often handled transparently to the user.
That is to say, on Unix, before a command ever sees a command line from a shell, the shell has expanded the wild cards into file names.
However, other shells, such as Tcl, do not do such wild card expansions automatically. The programmer of an application is responsible to either expand them (via glob) or to invoke an external command which then expands the wild cards.
Glob-style wild-card characters
* matches any string of characters (including the empty string)
(similar in concept to the regular expression .*)
? matches any single character.
(similar in concept to the regular expression .)
[...] matches a set of characters (need more detail)
(similar in concept to the regular expression [[a-z], etc.)
{alt1,alt2} matches alternatives (but not in [string match])
(similar in concept to the regular expression {text|text}
(Wiki bug: can't have unbalanced braces inside font context, so alt1 and alt2 are erroneously bold.)
\\ forces the next character to be interpreted as a literal. (Wiki bug: single backslash causes crash.)
Examples
Raj