{"id":39387261,"url":"https://github.com/vodkaslime/wildcard","last_synced_at":"2026-01-18T03:04:29.697Z","repository":{"id":61625529,"uuid":"541212833","full_name":"vodkaslime/wildcard","owner":"vodkaslime","description":"A simple golang customizable wildcard matcher.","archived":false,"fork":false,"pushed_at":"2022-09-26T07:04:10.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-09T15:20:36.631Z","etag":null,"topics":["golang","matcher","simple","tool","wildcard"],"latest_commit_sha":null,"homepage":"","language":"Go","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/vodkaslime.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}},"created_at":"2022-09-25T15:15:48.000Z","updated_at":"2022-09-30T08:30:14.000Z","dependencies_parsed_at":"2022-10-18T18:00:25.768Z","dependency_job_id":null,"html_url":"https://github.com/vodkaslime/wildcard","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/vodkaslime/wildcard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodkaslime%2Fwildcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodkaslime%2Fwildcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodkaslime%2Fwildcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodkaslime%2Fwildcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vodkaslime","download_url":"https://codeload.github.com/vodkaslime/wildcard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vodkaslime%2Fwildcard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["golang","matcher","simple","tool","wildcard"],"created_at":"2026-01-18T03:04:29.019Z","updated_at":"2026-01-18T03:04:29.641Z","avatar_url":"https://github.com/vodkaslime.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wildcard\n\nA simple golang customizable [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matcher. Golang has pretty well built regex functionalities, but it does not have basic wildcard matcher that works as nicely. Therefore this package serves the need to check whether a string matches a pattern in the rule of wildcard.\n\nTo keep simplicity, the matcher supports only two rules:\n- `\"?\"` for a single char.\n- `\"*\"` for any number (including zero) of chars.\n\nCharset like `\"[A-Za-z]\"` or SQL style wild cards like `%` are not supported.\n\n## usage\n\nTo import the package, `go get` the module.\n\n```\ngo get -u github.com/vodkaslime/wildcard@main\n```\n\n\n\nTo match pattern, use a matcher.\n\n```\npackage main\n\nimport (\n\t\"github.com/vodkaslime/wildcard\"\n)\n\nfunc main() {\n\tmatcher := wildcard.NewMatcher()\n\tp := \"a?c\"\n\ts := \"abc\"\n\tm, _ := matcher.Match(p, s)\n\tprintln(m)\n}\n\n```\n\nThe default wildcard chars are `\"?\"` for single chars and `\"*\"` for multiple chars. To customize this rule, tune the `S` field and `M` field accordingly.\n\nFor example to use `\".\"` as single char wildcard symbol:\n\n```\npackage main\n\nimport (\n\t\"github.com/vodkaslime/wildcard\"\n)\n\nfunc main() {\n\tmatcher := wildcard.NewMatcher()\n\tmatcher.S = '.'\n\tp := \"a.c\"\n\ts := \"abc\"\n\tm, _ := matcher.Match(p, s)\n\tprintln(m)\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvodkaslime%2Fwildcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvodkaslime%2Fwildcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvodkaslime%2Fwildcard/lists"}