{"id":18742746,"url":"https://github.com/maxpat78/w32_fnmatch","last_synced_at":"2026-01-28T07:01:30.723Z","repository":{"id":5631595,"uuid":"6839766","full_name":"maxpat78/w32_fnmatch","owner":"maxpat78","description":"An exact Win32 wildcard matching algorithm implementation for Python","archived":false,"fork":false,"pushed_at":"2024-10-24T06:54:55.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T15:51:50.304Z","etag":null,"topics":["algorithm","fnmatch","matcher","pure-python","python3","wildcard","win32"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxpat78.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-24T13:01:15.000Z","updated_at":"2024-10-24T06:54:58.000Z","dependencies_parsed_at":"2024-11-07T16:09:13.917Z","dependency_job_id":"0dd57931-fa96-441a-843b-92ac3fcedd1c","html_url":"https://github.com/maxpat78/w32_fnmatch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/maxpat78/w32_fnmatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpat78%2Fw32_fnmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpat78%2Fw32_fnmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpat78%2Fw32_fnmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpat78%2Fw32_fnmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxpat78","download_url":"https://codeload.github.com/maxpat78/w32_fnmatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpat78%2Fw32_fnmatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28841502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T05:50:12.573Z","status":"ssl_error","status_checked_at":"2026-01-28T05:49:54.528Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","fnmatch","matcher","pure-python","python3","wildcard","win32"],"created_at":"2024-11-07T16:09:09.254Z","updated_at":"2026-01-28T07:01:30.706Z","avatar_url":"https://github.com/maxpat78.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"w32_fnmatch\n===========\n\nThis package contains an exact Python implementation of the wildcard matching\nscheme found in modern Windows Command prompt.\n\nIt provides both a fnmatch compatible regex translator for use in\nPython's standard fnmatch module and a more traditional `match` algorithm.\n\nPython lacks an MD-DOS compatible wildcard matching engine, and in some\nsituations this is frustrating.\n\nSurprisingly, the matching algorithm for Long File Names is untouched since\nWindows NT 3.1 and its CMD command processor, so this is used here.\n\nFollowing rules are implemented:\n\n   1. `*` and `*.*` match all\n   2. `*.` matches all without extension\n   3. `.*` repeated n times matches without or with up to n extensions\n   4. `?` matches 1 character; 0 or 1 if followed by only wildcards\n   5. `*` matches multiple dots; `?` does not (except in NT 3.1)\n   6. `*.xyz` (3 characters ext, even with 1-2 `??`) matches any longer xyz ext\n      (unless short 8dot3 DOS names are disabled on a volume: Windows 8+) [*]\n   7. `[` and `]` are valid name characters\n\nAccording to MSDN, the star should match zero or more characters,\nand the question mark exactly one.\n\nReviewing the help for FsRtlIsNameInExpression API in NT kernel, it seems\neasy to say that the command interpreter implements a mix of rules. MSDN says:\n\n\t`*` (asterisk)            Matches zero or more characters.\n\t`?` (question mark)       Matches a single character.\n\tDOS_DOT                 Matches either a period or zero characters beyond the name string.\n\tDOS_QM                  Matches any single character or, upon encountering a period or end of name string,\n\t\t\t\t\t\t\tadvances the expression to the end of the set of contiguous DOS_QMs.\n\tDOS_STAR                Matches zero or more characters until encountering and matching the final . in the\n\t\t\t\t\t\t\tname.\n\nIn the COMMAND.COM, there are different rules:\n\n   1. `*` matches all file names without extension\n   2. `.*` matches all extensions\n   3. characters after a star are discarded\n   4. `[` and `]` aren't valid in file names\n   5. `?` follows CMD's rule 4\n   6. neither `?` nor `*` matches multiple dots\n\nUnder Windows 9x/ME, COMMAND.COM has long file names support and follows\nrules 1-2 and 5-7 like CMD; but `?` matches 1 character only, _except_ dot.\n\n\n\n[*] Default: false, unless `star_dot_three` is set, to emulate traditional\nbehavior. In an NTFS volume, rule 6 is honored when 8dot3names are enabled\n(i.e. in the system volume C: or by fsutil tool).\n\n*PLEASE NOTE*: when switching `star_dot_three`, the fnmatch._compile_pattern\ncache should be cleared, since some DOS wildcards could generate different\nregular expressions - see test_1 in tests.py.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpat78%2Fw32_fnmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxpat78%2Fw32_fnmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpat78%2Fw32_fnmatch/lists"}