Matching wildcards
In computer science, an algorithm for matching wildcards (also known as a globbing) is useful in comparing text strings that may contain wildcard syntax.[1] Common uses of these algorithms include command-line interfaces, e.g. the Bourne shell[2] or Microsoft Windows command-line[3] or file manager, as well as the interfaces for some search engines[4] and databases.[5] Matching wildcards functionality is central to the processing of regular expressions.[6]
History
Early algorithms for matching wildcards often relied on recursion, but the technique was criticized on grounds of performance[7] and reliability[8] considerations. Non-recursive algorithms for matching wildcards have gained favor in light of these considerations.
Among both recursive and non-recursive algorithms, strategies for performing the pattern matching operation vary widely, as evidenced among the variety of example algorithms referenced below. Test case development and performance optimization techniques have been demonstrably brought to bear on certain algorithms, particularly those developed by critics of the recursive algorithms.
Examples of recursive algorithms
Non-recursive algorithms developed by critics of the recursive algorithms
- Krauss open source matching wildcards algorithm[14]
- Alessandro Cantatore's open source wildcard matching algorithms[15]
- Siler's algorithm[16]
Other non-recursive algorithms
See also
References
- ↑ "Wildcard characters". ScienceDirect. 2018.
- ↑ Quigley, Ellie (2005). "UNIX Shell Programming QuickStart". InformIT.com.
- ↑ "MS-DOS and Windows Wildcard Characters". Microsoft Developer Network Library.
- ↑ "Apache Lucene - Query Parser Syntax". Apache Lucene 2.9.4 Documentation. 2006.
- ↑ "SQL Wildcards". W3Schools. 2018.
- ↑ Goyvaerts, Jan (2018). "Welcome to Regular-Expressions.info". RegularExpressions.info.
- ↑ Cantatore, Alessandro (2003). "Wildcard matching algorithms".
- ↑ Krauss, Kirk (2008). "Matching Wildcards: An Algorithm". Dr. Dobb's Journal.
- ↑ Salz, Rich (1991). "wildmat.c". GitHub.
- ↑ Filip (2014). "Compare strings with wildcard". Stack Overflow.
- ↑ Deadlock (2015). "Wildcard Matching Recursive Algorithm C++". Stack Overflow.
- ↑ Murugesan, Vignesh (2014). "WildCard Matching algorithm".
- ↑ "fnmatch.c". opensource.apple.com. 1999.
- ↑ Krauss, Kirk (2018). "Matching Wildcards: An Improved Algorithm for Big Data". Develop for Performance.
- ↑ Cantatore, Alessandro (2003). "Wildcard matching algorithms".
- ↑ Siler (2013). "Recursive solutions for glob pattern matching". Stack Overflow.
- ↑ Shafiq, Shahid (2007). "String Wildcard Matching". Code Project.
- ↑ Handy, Jack (2005). "Wildcard string compare (globbing}". Code Project.