Wildcard is a technical term used in computing which indicates a placeholder for other characters. This concept is often referred to as globbing. Globbing is used in computing to refer to an instance of pattern matching behavior. The term Wildcard often confuses a new learning adaptive user, particularly from other fields and not used with Linux or UNIX Like systems. In one article post, a reader asked us what is this Wildcard actually is, instead of a comment reply, we found an article on Wildcard might help others as well.
What is this Wildcard is ?
Wildcard has specific usage patterns in the field of Telecommunication and super specialized areas of Computing like its usage for Files and directories or inÂ Databases. The usage ofÂ Wildcard unfortunately does not follow any universal pattern. As we mentioned globbing, globbing came from the word glob, which is a Unix library function terminology that is used to expand file names using pattern matching notation.
Example usage of Wildcard
Many command line interpreter and other programs allow the use of placeholders to address, for example, groups of files whose names we exactly do not know. Search function in text editors is a well known usage wildcard. In Windows Operating System, Wildcard can be used to search a particular type of files. Example can be searching with *.jpg in Windows Operating System will list all the indexed .jpg files irrespective of its name :
List of Frequently used Wildcard Characters :
- The question mark (?) is used for a single character in library catalogs as a general common abbreviation
- The asterisk (*) or the percent sign (%) is used as Wildcard for any number (including zero)
- The Number sign or Hash sign (#) is used asÂ Wildcard for a numeric value
Some programs, such as POSIX -compliant UNIX – shells expand the wildcard principle to regular expressions by allowing multiple characters in one place: square brackets can be used. Letters in the brackets: [a-zA-Z] * searches for all files whose names consist only of the 26 letters from A to Z (in capital letters and small letters).
The database language SQL uses the underscore (_) as a wildcard for one character and the percent sign (%) as a wildcard for any number of letters.Â Wildcard domain is used in DNS servers and it relies on the principle of placeholder.