Wildcard in Programming
What is Wildcard?
Wildcard is a symbol used to replace or represent one or two characters. There are different types of symbols used for the wildcard. Many application and Operating Systems support wildcard to search for file and directories. It helps the user to search for files with using short forms while searching for a file name. The advantage of the functions of Wildcard is that if the person doesn't remember the full name but vaguely remembers a few letters they can see all the options available with that file name and recognize the name rather which is easier than having to remember the full name.
What are the different symbols used as Wildcard Character?
There are different characters used as a Wildcard:-
- PercentWildcard (%) -: The percent wildcard is used to matches characters zero or more times in the Structured Query Language (SQL). It includes the underscore symbol as well.
- AsteriskWildcard(*) -: The Asterisk is used to match characters zero or more times. For example , for (comp*) all the terms starting 'comp' such as computer, complete, will be included in this.
- Question MarkWildcard (?):- The question Mark is used to match a single character. For example for ("c*mp") the perfect matches would include words like camp and comp. In MS-DOS and the Windows the question mark symbol(?) matches the trailing question marks zero or one times. For example, ("si??") would also show the result sip even though it doesn't have four character. This is because it matches the trailing question mark.
- Open and close Bracket Wildcard ([]) :- The open and close brackets match single characters in the range . For example, the letter f would be matched by this Wildcard but the number 8 would not be matches by this Wildcard because it is not a part of this range.
What are the programming languages that support the usage of Wildcard?
Wildcard can be used in Javascript and C++ and Structured Query Language (SQL)._________________________________________________________________________________
Reference
- http://www.webopedia.com/TERM/W/wildcard_character.html
- http://www.computerhope.com/jargon/w/wildcard.htm
- http://www.rlvision.com/blog/using-wildcard-matching-in-any-programming-language/
- https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwjtvY7UxrPQAhWQ3oMKHYZLD8kQjRwIBw&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FWildcard_certificate&bvm=bv.139250283,d.cGw&psig=AFQjCNGxhdnqCiwY_sYNiEs5xq-f6jjmpQ&ust=1479601335672746(Image)
_________________________________________________________________________________
HI!The wildcard could be useful for us when searching a file. When sometimes we are not able to remember the whole file name, we can use those wildcard to replace the characters we forget. So this article will be helpful for us in order to get the file we want much quicker.
ReplyDeleteShuzhi