{"id":32705169,"url":"https://github.com/xcaeser/glob.zig","last_synced_at":"2026-06-24T01:31:38.275Z","repository":{"id":321832171,"uuid":"1087346233","full_name":"xcaeser/glob.zig","owner":"xcaeser","description":"Fast and reliable glob pattern matching in pure zig.","archived":false,"fork":false,"pushed_at":"2025-10-31T18:58:39.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-31T20:27:18.963Z","etag":null,"topics":["zig","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"https://xcaeser.github.io/glob.zig/","language":"Zig","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/xcaeser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T18:53:39.000Z","updated_at":"2025-10-31T19:14:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0b429e5-954d-437b-a108-f76b5f9f10f9","html_url":"https://github.com/xcaeser/glob.zig","commit_stats":null,"previous_names":["xcaeser/glob.zig"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xcaeser/glob.zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcaeser%2Fglob.zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcaeser%2Fglob.zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcaeser%2Fglob.zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcaeser%2Fglob.zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xcaeser","download_url":"https://codeload.github.com/xcaeser/glob.zig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcaeser%2Fglob.zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34713789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["zig","zig-package","ziglang"],"created_at":"2025-11-02T01:01:35.684Z","updated_at":"2026-06-24T01:31:38.270Z","avatar_url":"https://github.com/xcaeser.png","language":"Zig","funding_links":[],"categories":["Language Essentials"],"sub_categories":["File Format Processing"],"readme":"# 📂 glob.zig - a powerful glob matcher\n\nFast and reliable glob pattern matching in pure zig.\n\n[glob.zig reference docs](https://xcaeser.github.io/glob.zig)\n\n[![Tests](https://github.com/xcaeser/glob.zig/actions/workflows/main.yml/badge.svg)](https://github.com/xcaeser/glob.zig/actions/workflows/main.yml)\n[![Zig Version](https://img.shields.io/badge/Zig_Version-0.16.0--dev-orange.svg?logo=zig)](README.md)\n[![License: MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg?logo=cachet)](LICENSE)\n[![Built by xcaeser](https://img.shields.io/badge/Built%20by-@xcaeser-blue)](https://github.com/xcaeser)\n[![Version](https://img.shields.io/badge/glob-v0.1.0-green)](https://github.com/xcaeser/glob.zig/releases)\n\n## 🚀 Features\n\n- Fast glob pattern matching with `*`, `?`, and character classes `[abc]`, `[a-z]`\n- Negation support with `!` prefix\n- Pattern validation for common errors\n- Multiple pattern matching (`matchAny`, `matchAll`)\n- No dependencies, pure Zig\n- Comprehensive test suite\n\n## 📦 Installation\n\n```sh\nzig fetch --save=glob https://github.com/xcaeser/glob.zig/archive/v0.1.0.tar.gz\n```\n\nAdd to your `build.zig`:\n\n```zig\nconst glob_dep = b.dependency(\"glob\", .{ .target = target, .optimize = optimize });\nexe.root_module.addImport(\"glob\", glob_dep.module(\"glob\"));\n```\n\n## 🧪 Example\n\n```zig\nconst std = @import(\"std\");\nconst glob = @import(\"glob\");\n\npub fn main() !void {\n    // Simple match\n    const matches = glob.match(\"*.zig\", \"main.zig\");\n    std.debug.print(\"Matches: {}\\n\", .{matches}); // true\n\n    // Character class\n    const class_match = glob.match(\"test_[0-9].txt\", \"test_5.txt\");\n    std.debug.print(\"Class match: {}\\n\", .{class_match}); // true\n\n    // Negation\n    const negated = glob.match(\"!*.tmp\", \"file.txt\");\n    std.debug.print(\"Negated: {}\\n\", .{negated}); // true\n\n    // Multiple patterns\n    const patterns = \u0026[_][]const u8{ \"*.zig\", \"*.c\", \"*.h\" };\n    const multi = glob.matchAny(patterns, \"main.zig\");\n    std.debug.print(\"Any match: {}\\n\", .{multi}); // true\n\n    // Validate pattern\n    glob.validate(\"[a-z]*\") catch |err| {\n        std.debug.print(\"Invalid pattern: {}\\n\", .{err});\n        return;\n    };\n}\n```\n\n## 📚 API\n\n### `match(pattern: []const u8, text: []const u8) bool`\n\nMatches text against a glob pattern.\n\nSupported wildcards:\n\n- `*` — matches any number of characters\n- `?` — matches any single character\n- `[abc]` — matches one character from the set\n- `[a-z]` — matches one character from the range\n- `!` — negates the pattern (must be first character)\n\n### `validate(pattern: []const u8) !void`\n\nValidates a pattern for syntax errors.\n\n### `matchAny(patterns: []const []const u8, text: []const u8) bool`\n\nReturns true if text matches any of the patterns.\n\n### `matchAll(patterns: []const []const u8, text: []const u8) bool`\n\nReturns true if text matches all of the patterns.\n\n## 📝 License\n\nMIT. See [LICENSE](LICENSE). Contributions welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcaeser%2Fglob.zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcaeser%2Fglob.zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcaeser%2Fglob.zig/lists"}