Simple name filter utility class.
- a filter consists of one or more globs
- a glob prefixed by
- (dash) is treated as an exclusion pattern;
all others are considered inclusion patterns
- a leading
- (dash) must be escaped by prepending \ (backslash)
if it should be interpreted as a literal
* (asterisk) serves as a wildcard, i.e. it matches any
substring in the target name
* (asterisk) occurrences within the glob to be interpreted as
literals must be escaped by prepending \ (backslash)
- a filter matches a target name if any of the inclusion patterns match but
none of the exclusion patterns
Examples:
["foo*", "-foo99"] matches
"foo" and
"foo bar"
but not
"foo99".
["foo\*"] matches
"foo*" but not
"foo99".
["\-blah"] matches
"-blah".