{"id":16949473,"url":"https://github.com/tailhook/capturing-glob","last_synced_at":"2025-04-11T20:20:32.599Z","repository":{"id":57531321,"uuid":"114052968","full_name":"tailhook/capturing-glob","owner":"tailhook","description":"A glob (file matching utility) with capture groups (similar to regex)","archived":false,"fork":false,"pushed_at":"2018-02-09T17:24:39.000Z","size":246,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T16:15:55.160Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailhook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T00:17:11.000Z","updated_at":"2023-12-13T23:48:40.000Z","dependencies_parsed_at":"2022-09-06T17:21:35.418Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/capturing-glob","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fcapturing-glob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fcapturing-glob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fcapturing-glob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fcapturing-glob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/capturing-glob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447550,"owners_count":21105137,"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","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-13T21:54:52.945Z","updated_at":"2025-04-11T20:20:32.571Z","avatar_url":"https://github.com/tailhook.png","language":"Rust","readme":"Capturing Glob\n==============\n\n[Documentation](https://docs.rs/capturing-glob) |\n[Github](https://github.com/tailhook/capturing-glob) |\n[Crate](https://crates.io/crates/capturing-glob)\n\nSupport for matching file paths against Unix shell style patterns, and\ncapture groups when matching (similarly to captures in regexes).\n\n\n## Usage\n\nAnd add this to your crate root:\n\n```rust\nextern crate capturing_glob;\n```\n\n## Examples\n\nPrint all jpg files in /media/ and all of its subdirectories.\n\n```rust\nuse capguring_glob::glob;\n\nfor entry in glob(\"/media/**/(*).jpg\").expect(\"Failed to read glob pattern\") {\n    match entry {\n        Ok(entry) =\u003e println!(\"Path {:?}, name {:?}\",\n            entry.path().display(), entry.group(1).unwrap()),\n        Err(e) =\u003e println!(\"{:?}\", e),\n    }\n}\n```\nNote: in the case above, regular filename matching might be used\n(i.e. ``file_stem()``), but the library allows you to skip unwraps here, but\nmore importantly you can use user-defined globs like these:\n\n* ``(*)/package.json``\n* ``tests/(*).spec.js``\n* ``docs/(section-*).rst``\n* ``/usr/share/zoneinfo/(*/*)``\n\n\nLicense\n=======\n\nLicensed under either of\n\n* Apache License, Version 2.0,\n  (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)\n  at your option.\n\nContribution\n------------\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fcapturing-glob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Fcapturing-glob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fcapturing-glob/lists"}