Wildmat
wildmat is a pattern matching library developed by Rich Salz.[src] Based on the wildcard syntax already used in the Bourne shell, wildmat provides a uniform mechanism for matching patterns across applications with simpler syntax than that typically offered by regular expressions.[src] Patterns are implicitly anchored at the beginning and end of each string when testing for a match.[src] In June 2019, Rich Salz released the original version of the now-defunct library on GitHub under a public domain dedication.[src]
wildmat is a pattern matching library developed by Rich Salz.[src] Based on the wildcard syntax already used in the Bourne shell, wildmat provides a uniform mechanism for matching patterns across applications with simpler syntax than that typically offered by regular expressions.[src] Patterns are implicitly anchored at the beginning and end of each string when testing for a match.[src] In June 2019, Rich Salz released the original version of the now-defunct library on GitHub under a public domain dedication.[src] ==Pattern matching operations== There are five pattern matching operations other than a strict one-to-one match between the pattern and the source to be checked for a match.[src] Asterisk (*) to match any sequence of zero or more characters.[src] Question mark (?) to match any single character.[src] Set of specified characters.[src] It is specified as a list of characters, or as a range of characters where the beginning and end of the range are separated by a minus (or dash) character, or as any combination of lists and ranges.[src] The dash can also be included in the set as a character if it is the beginning or end of the set.[src] This set is enclosed in square brackets.[src] The close square bracket ( ] ) may be used in a set if it is the first character in the set.[src] Negation of a set.[src] It is specified the same way as the set with the addition of a caret character (^) at the beginning of the test string just inside the open square bracket.[src] (NNTP specifies an alternative !.[src] The implementation can be configured to do either.) Backslash (\) character to invalidate the special meaning of the open square bracket ( [ ), the asterisk, backslash or the question mark.[src] Two backslashes in sequence will result in the evaluation of the backslash as a character with no special meaning.[src] ===Examples=== *foo* matches string containing "foo".[src] mini* matches anything that begins with "mini" (including the string "mini" itself).[src] ???* matches any string of three and more letters.[src] [0-9a-zA-Z] matches every single alphanumeric ASCII character.[src] [^]-] matches a character other than a close square bracket or a dash.[src] ==Usage== wildmat is most commonly seen in NNTP implementations such as Salz's own INN, also in unrelated software such as GNU tar and Transmission.[src] GNU tar replaced wildmat with the POSIX fnmatch glob matcher in September 1992.[src] The early version contained a potential out-of-bound access on unclosed .[src] The original byte oriented wildmat implementation is unable to handle multibyte character sets, and poses problems when the text being searched may contain multiple incompatible character sets.[src] A simplified version of wildmat oriented toward UTF-8 encoding has been developed by the IETF NNTP working group.[src] It is a part of (section 4), the 2006 standard for NNTP.[src] In the newer INN which supports UTF-8, a "uwildmat" was added which supports all the features of wildmat.[src] This 2000 rewrite, performed by Russ Allbery, fixes the OOB in the original implementation.[src] Tightly-wound C loops were written out into smaller statements.[src] Rsync includes a GPLv3-licensed wildmat descendant known as wildmatch, modified by Wayne Davison.[src] The Git version control system imports and makes use of it.[src] It does not support UTF-8, but has the OOB fixed and has additional support for character classes and star globs (** for arbitrary-depth).[src] ==See also== glob (programming) Kleene star Matching wildcards ==References== ==External links==[src]
39 sentences · 39 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Wildmat." encyclopegia.org, 2026, https://encyclopegia.org/wiki/wildmat. Accessed 25 November 2026.
Chicago
"Wildmat." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/wildmat.
APA
encyclopegia.org. (2026). Wildmat. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/wildmat
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON