{"id":15989205,"url":"https://github.com/robot-inventor/regex-syntax","last_synced_at":"2026-04-02T00:46:33.810Z","repository":{"id":227269692,"uuid":"770938146","full_name":"Robot-Inventor/regex-syntax","owner":"Robot-Inventor","description":"Grammar files for syntax highlight of regex","archived":false,"fork":false,"pushed_at":"2026-03-20T07:40:35.000Z","size":698,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-21T00:31:23.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Robot-Inventor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-03-12T12:20:37.000Z","updated_at":"2026-03-20T07:40:37.000Z","dependencies_parsed_at":"2024-03-25T03:23:08.984Z","dependency_job_id":"6d207e88-9ba4-4f2e-be34-0d6130a661ac","html_url":"https://github.com/Robot-Inventor/regex-syntax","commit_stats":null,"previous_names":["robot-inventor/regex-syntax"],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/Robot-Inventor/regex-syntax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fregex-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fregex-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fregex-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fregex-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robot-Inventor","download_url":"https://codeload.github.com/Robot-Inventor/regex-syntax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fregex-syntax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: 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":"2024-10-08T04:40:51.644Z","updated_at":"2026-04-02T00:46:33.793Z","avatar_url":"https://github.com/Robot-Inventor.png","language":"TypeScript","readme":"# regex-syntax\n\nGrammar files for syntax highlight of regex. The grammar files are automatically generated from [Linguist](https://github.com/github-linguist/linguist/)'s regex grammars.\n\n\u003e [!NOTE]\n\u003e You may also be interested in [shell-session-syntax](https://github.com/Robot-Inventor/shell-session-syntax/) for syntax highlight of shell sessions.\n\n|                  Before                  |              After              |\n| :--------------------------------------: | :-----------------------------: |\n| ![before](docs/without-regex-syntax.png) | ![after](docs/regex-syntax.png) |\n\n## Usage\n\nTo use regex-syntax in [Shiki.js](https://shiki.style/), please download ``./syntaxes/regex.tmLanguage.json`` or install the package and load it as a custom language grammar. Language name is ``regex`` and ``regexp``.\n\n```bash\nnpm install @robot-inventor/regex-syntax\n```\n\n```typescript\nimport { getHighlighter } from \"shiki\";\n// Directly import the downloaded file.\nimport regex from \"./regex.tmLanguage.json\";\n// Or import the package.\nimport regex from \"@robot-inventor/regex-syntax\";\n\nconst code = `\n^[a-zA-Z0-9.!#$%\u0026'*+/=?^_\\`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$\n`.trim();\n\nconst highlighter = await getHighlighter({\n    langs: [regex],\n    themes: [\"vitesse-dark\"]\n});\n\nconst html = highlighter.codeToHtml(code, {\n    lang: \"regex\",\n    theme: \"vitesse-dark\"\n});\n\nconsole.log(html);\n```\n\n## Update Grammar\n\nTo update the grammar file, run the following command. It automatically downloads the latest upstream grammar files and applies patches.\n\n```bash\nnpm run build\n```\n\n## Grammar Sources\n\nregex-syntax is generated by automatically applying patches to the following grammar file.\n\n- [Linguist](https://github.com/github-linguist/linguist/) ([MIT License](https://github.com/github-linguist/linguist/blob/master/LICENSE))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fregex-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobot-inventor%2Fregex-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fregex-syntax/lists"}