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

Other non-recursive algorithms

  • M Shahid Shafiq's open source algorithm[17]
  • Jack Handy's algorithm[18]

See also

References

  1. "Wildcard characters". ScienceDirect. 2018.
  2. Quigley, Ellie (2005). "UNIX Shell Programming QuickStart". InformIT.com.
  3. "MS-DOS and Windows Wildcard Characters". Microsoft Developer Network Library.
  4. "Apache Lucene - Query Parser Syntax". Apache Lucene 2.9.4 Documentation. 2006.
  5. "SQL Wildcards". W3Schools. 2018.
  6. Goyvaerts, Jan (2018). "Welcome to Regular-Expressions.info". RegularExpressions.info.
  7. Cantatore, Alessandro (2003). "Wildcard matching algorithms".
  8. Krauss, Kirk (2008). "Matching Wildcards: An Algorithm". Dr. Dobb's Journal.
  9. Salz, Rich (1991). "wildmat.c". GitHub.
  10. Filip (2014). "Compare strings with wildcard". Stack Overflow.
  11. Deadlock (2015). "Wildcard Matching Recursive Algorithm C++". Stack Overflow.
  12. Murugesan, Vignesh (2014). "WildCard Matching algorithm".
  13. "fnmatch.c". opensource.apple.com. 1999.
  14. Krauss, Kirk (2018). "Matching Wildcards: An Improved Algorithm for Big Data". Develop for Performance.
  15. Cantatore, Alessandro (2003). "Wildcard matching algorithms".
  16. Siler (2013). "Recursive solutions for glob pattern matching". Stack Overflow.
  17. Shafiq, Shahid (2007). "String Wildcard Matching". Code Project.
  18. Handy, Jack (2005). "Wildcard string compare (globbing}". Code Project.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.