Wildcard/glob file name matcher.
Actively maintained. Last release 10 days ago, commits in 12 of the last 26 weeks. A safe choice.
pip install wcmatchWildcard Match
[!warning] Security Considerations
Wildcard Match translates the more simple, path-centric syntax of glob patterns to regular expression for the purpose of iterating and matching file systems.
Regular expression engines like those in JavaScript, Python, Java, etc. choose compatibility and expressiveness over guaranteed performance, accepting the risk of catastrophic backtracking when patterns contain nested quantifiers or overlapping alternations.
ReDoS (regular expression Denial of Service) cases are those that specifically target the areas where a regular expression engine does not guarantee optimal performance.
Because Wildcard Match builds its matching upon the Python regular expression engine, it can take advantage of the engine's power, but it is also susceptible the engine's weaknesses.
Learn more here, and be thoughtful about what you provide to this library in production systems.
Overview
Wildcard Match translates the more simple, path-centric syntax of glob patterns to regular expression for the purpose of iterating and matching file systems.
Wildcard Match provides an enhanced fnmatch, glob, and pathlib library in order to provide file matching and
globbing that more closely follows the features found in Bash. In some ways these libraries are similar to Python's
builtin libraries as they provide a similar interface to match, filter, and glob the file system. But they also include
a number of features found in Bash's globbing such as backslash escaping, brace expansion, extended glob pattern groups,
etc. They also add a number of new useful functions as well, such as which functions like , but for
paths.