ion. There are two ways of doing this check. >>> m = _match(b'/foo', b'', [br're:.*\.c$', b'relpath:a']) 1. Calling the matcher with a file name returns True if any pattern matches that file name: >>> m(b'a') True >>> m(b'main.c') True >>> m(b'test.py') False 2. Using the exact() method only returns True if the file name matches one of the exact patterns (i.e. not re: or glob: patterns): >>> m.exact(b'a') True >>> m.exact(b'main.c') False c