The Wildmat Format

From the Inn documentation set and the NNTP extensions internet draft

The WILDMAT format was first developed by Rich Salz based on the format used in the UNIX "find" command to articulate file names. It was developed to provide a uniform mechanism for matching patterns in the same manner that the UNIX shell matches filenames. Patterns are implicitly anchored at the beginning and end of each string when testing for a match. 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.

The pattern is interpreted as follows:

\xTurns off the special meaning of x and matches it directly; this is used mostly before a question mark or asterisk, and is not special inside square brackets.
?Matches any single character.
*Matches any sequence of zero or more characters.
[x...y]Matches any single character specified by the set x...y. A minus sign may be used to indicate a range of characters. That is, [0-5abc] is a shorthand for [012345abc]. More than one range may appear inside a character set; [0-9a-zA-Z._] matches almost all of the legal characters for a host name. The close bracket, ], may be used if it is the first character in the set. The minus sign, -, may be used if it is either the first or last character in the set.
[^x...y] This matches any character not in the set x...y, which is interpreted as described above. For example, [^]-] matches any character other than a close bracket or minus sign.

Examples

*news.admin.net-abuse.*  the usual form - matches all newsgroups in the news.admin.net-abuse hierarchy
[^]-] matches any single character other than a close square bracket or a minus sign/dash.
*bdc matches any string that ends with the string "bdc" including the string "bdc" (without quotes).
[0-9a-zA-Z] matches any single printable alphanumeric ASCII character.
a??d matches any four character string which begins with a and ends with d.