{"id":47158105,"url":"https://github.com/teragrep/glb_01","last_synced_at":"2026-03-13T02:36:33.525Z","repository":{"id":336607535,"uuid":"1139721112","full_name":"teragrep/glb_01","owner":"teragrep","description":"Teragrep GlobToRegex Library for Java","archived":false,"fork":false,"pushed_at":"2026-02-05T07:46:32.000Z","size":74,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-05T19:42:23.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teragrep.png","metadata":{"files":{"readme":"README.adoc","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T10:26:16.000Z","updated_at":"2026-02-05T07:44:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/teragrep/glb_01","commit_stats":null,"previous_names":["teragrep/glb_01"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/teragrep/glb_01","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fglb_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fglb_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fglb_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fglb_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teragrep","download_url":"https://codeload.github.com/teragrep/glb_01/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fglb_01/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30456055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T02:22:12.178Z","status":"ssl_error","status_checked_at":"2026-03-13T02:06:49.475Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-03-13T02:36:32.311Z","updated_at":"2026-03-13T02:36:33.512Z","avatar_url":"https://github.com/teragrep.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Teragrep GlobToRegex Library for Java\n\nTeragrep GlobToRegex Library converts a https://en.wikipedia.org/wiki/Glob_(programming)[Glob pattern] into Java https://en.wikipedia.org/wiki/Regular_expression[regular expression].\n\n== Features\n\nConversion supports following Glob expressions:\n- Alternatives with nesting support (Braces)\n- Character classes with negations (Brackets)\n- Escapes (Backslashes)\n- Wildcard characters (Questionmarks)\n- Wildcard matches (Stars)\n- Text into regex quotation\n\n\n== Documentation\n\nSee the official documentation on https://docs.teragrep.com[docs.teragrep.com].\n\n== Limitations\n\nIt is a pure Java implementation of following grammar and is bit hard to read.\n\n[source,antlr4]\n----\n\ngrammar Glob;\n\nroot // Glob.java\n    : rootSequence EOF\n    ;\n\nrootSequence // RootSequence.java\n    : (element | COMMA)*\n    ;\n\n\nelement\n    : braceExp      // BraceExpression.java\n    | charClass     // CharacterClassExpression.java\n    | WILDCARD      // WildcardExpression.java\n    | QUESTION      // QuestionMarkExpression.java\n    | ESCAPED       // EscapeExpression.java\n    | TEXT          // Text.java\n    ;\n\nbraceExp\n    : LBRACE element* (COMMA element*)* RBRACE\n    ;\n\ncharClass\n    : LBRACK BANG? CLASS_CONTENT+ RBRACK\n    ;\n\n// --- Lexer Rules ---\n\nESCAPED : '\\\\' . ;\nWILDCARD: '*' ;\nQUESTION: '?' ;\nLBRACK  : '[' ;\nRBRACK  : ']' ;\nLBRACE  : '{' ;\nRBRACE  : '}' ;\nCOMMA   : ',' ;\nBANG    : '!' ;\n\nTEXT    : ~[\\\\*?\\[\\]{},]+ ;\nCLASS_CONTENT : ~[\\]\\\\] | '\\\\' . ;\n----\n\n\n== How to [compile/use/implement]\n\n=== Usage\n\n[source,java]\n----\nimport com.teragrep.glb_01.Glob;import com.teragrep.glb_01.GlobImpl;\n\nGlob glob = new GlobImpl(\"test*Wildcard\");\nString regex = glob.asRegex();\nSystem.out.println(regex); // Results into ^\\Qtest\\E.*\\QWildcard\\E$\n----\n\n\n== Contributing\n\n// Change the repository name in the issues link to match with your project's name\n\nYou can involve yourself with our project by https://github.com/teragrep/glb_01/issues/new/choose[opening an issue] or submitting a pull request.\n\nContribution requirements:\n\n. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.\n. Security checks must pass\n. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.\n. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).\n\nRead more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].\n\n=== Contributor License Agreement\n\nContributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.\n\nYou need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fglb_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteragrep%2Fglb_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fglb_01/lists"}