is part of libinn(3).
returns non-zero if the pattern matches the text.
The pattern is interpreted according to rules similar to shell filename
wildcards, and not as a full regular expression such as those handled by the
family of programs or the
set of routines.
The pattern is interpreted as follows:
Turns off the special meaning of
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.
Matches any single character specified by the set
A minus sign may be used to indicate a range of characters.
is a shorthand for
More than one range may appear inside a character set;
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.
This matches any character
in the set
which is interpreted as described above.
matches any character other than a close bracket or minus sign.
Written by Rich $alz <firstname.lastname@example.org> in 1986, and posted to Usenet
several times since then, most notably in comp.sources.misc in
Lars Mathiesen <email@example.com> enhanced the multi-asterisk failure
mode in early 1991.
Rich and Lars increased the efficiency of star patterns and reposted it
to comp.sources.misc in April, 1991.
Robert Elz <firstname.lastname@example.org> added minus sign and close bracket handling
in June, 1991.