{"id":16048968,"url":"https://github.com/devongovett/glob-match","last_synced_at":"2025-10-25T03:36:56.422Z","repository":{"id":65340027,"uuid":"589711913","full_name":"devongovett/glob-match","owner":"devongovett","description":"An extremely fast glob matching library in Rust.","archived":false,"fork":false,"pushed_at":"2024-08-19T09:20:36.000Z","size":28,"stargazers_count":335,"open_issues_count":8,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-26T01:09:09.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devongovett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-01-16T18:58:57.000Z","updated_at":"2025-05-19T05:54:55.000Z","dependencies_parsed_at":"2025-01-20T12:01:48.476Z","dependency_job_id":"0ca19ff8-15da-4bfa-941d-3f3e1cea502b","html_url":"https://github.com/devongovett/glob-match","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/devongovett/glob-match","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devongovett%2Fglob-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devongovett%2Fglob-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devongovett%2Fglob-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devongovett%2Fglob-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devongovett","download_url":"https://codeload.github.com/devongovett/glob-match/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devongovett%2Fglob-match/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280901469,"owners_count":26410586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-09T00:11:55.462Z","updated_at":"2025-10-25T03:36:56.392Z","avatar_url":"https://github.com/devongovett.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glob-match\n\nAn extremely fast glob matching library with support for wildcards, character classes, and brace expansion.\n\n* Linear time matching. No exponential backtracking.\n* Zero allocations.\n* No regex compilation. Matching occurs on the glob pattern in place.\n* Support for capturing matched ranges of wildcards.\n* Thousands of tests based on Bash and [micromatch](https://github.com/micromatch/micromatch).\n\n## Example\n\n```rust\nuse glob_match::glob_match;\n\nassert!(glob_match(\"some/**/{a,b,c}/**/needle.txt\", \"some/path/a/to/the/needle.txt\"));\n```\n\nWildcard values can also be captured using the `glob_match_with_captures` function. This returns a `Vec` containing ranges within the path string that matched dynamic parts of the glob pattern. You can use these ranges to get slices from the original path string.\n\n```rust\nuse glob_match::glob_match_with_captures;\n\nlet glob = \"some/**/{a,b,c}/**/needle.txt\";\nlet path = \"some/path/a/to/the/needle.txt\";\nlet result = glob_match_with_captures(glob, path)\n  .map(|v| v.into_iter().map(|capture| \u0026path[capture]).collect());\n\nassert_eq!(result, vec![\"path\", \"a\", \"to/the\"]);\n```\n\n## Syntax\n\n| Syntax  | Meaning                                                                                                                                                                                             |\n| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `?`     | Matches any single character.                                                                                                                                                                       |\n| `*`     | Matches zero or more characters, except for path separators (e.g. `/`).                                                                                                                             |\n| `**`    | Matches zero or more characters, including path separators. Must match a complete path segment (i.e. followed by a `/` or the end of the pattern).                                                  |\n| `[ab]`  | Matches one of the characters contained in the brackets. Character ranges, e.g. `[a-z]` are also supported. Use `[!ab]` or `[^ab]` to match any character _except_ those contained in the brackets. |\n| `{a,b}` | Matches one of the patterns contained in the braces. Any of the wildcard characters can be used in the sub-patterns. Braces may be nested up to 10 levels deep.                                     |\n| `!`     | When at the start of the glob, this negates the result. Multiple `!` characters negate the glob multiple times.                                                                                     |\n| `\\`     | A backslash character may be used to escape any of the above special characters.                                                                                                                    |\n\n## Benchmarks\n\n```\nglobset                 time:   [35.176 µs 35.200 µs 35.235 µs]\nglob                    time:   [339.77 ns 339.94 ns 340.13 ns]\nglob_match              time:   [179.76 ns 179.96 ns 180.27 ns]\n```\n\n## Fuzzing\n\nYou can fuzz `glob-match` itself using `cargo fuzz`. See the\n[Rust Fuzz Book](https://rust-fuzz.github.io/book/cargo-fuzz/setup.html) for\nguidance on setup and installation. Follow the Rust Fuzz Book for information on\nhow to configure and run Fuzz steps.\n\nAfter discovering artifacts, use `cargo fuzz fmt [target] [artifact-path]` to\nget the original input back.\n\n```sh\n$ cargo fuzz fmt both_fuzz fuzz/artifacts/both_fuzz/slow-unit-LONG_HASH\nOutput of `std::fmt::Debug`:\n\nData {\n    pat: \"some pattern\",\n    input: \"some input\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevongovett%2Fglob-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevongovett%2Fglob-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevongovett%2Fglob-match/lists"}