{"id":20626978,"url":"https://github.com/sang-it/t_rex","last_synced_at":"2026-04-16T21:36:20.806Z","repository":{"id":216041590,"uuid":"740201994","full_name":"Sang-it/t_rex","owner":"Sang-it","description":"NFA / DFA based Regex Engine in TS.","archived":false,"fork":false,"pushed_at":"2024-01-10T07:20:39.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T23:12:40.474Z","etag":null,"topics":["dfa","finite-state-machine","nfa","regex"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Sang-it.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-07T20:15:01.000Z","updated_at":"2024-01-08T08:20:39.000Z","dependencies_parsed_at":"2024-01-08T09:26:17.977Z","dependency_job_id":"47908ead-fc36-448b-9f0e-901ce2eb84d6","html_url":"https://github.com/Sang-it/t_rex","commit_stats":null,"previous_names":["sang-it/regex_ts","sang-it/t_rex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sang-it/t_rex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sang-it%2Ft_rex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sang-it%2Ft_rex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sang-it%2Ft_rex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sang-it%2Ft_rex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sang-it","download_url":"https://codeload.github.com/Sang-it/t_rex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sang-it%2Ft_rex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31905890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["dfa","finite-state-machine","nfa","regex"],"created_at":"2024-11-16T13:15:26.000Z","updated_at":"2026-04-16T21:36:20.763Z","avatar_url":"https://github.com/Sang-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eT_REX\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\nNFA/DFA based  Regex Machine\n    \u003cbr /\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n     \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgements\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nI always wanted to know how Regular Expressions worked. That took me down this deep rabbit hole of Formal Grammar, Chomsky Hierarchy, Kleene Star and etc.\n\nI also had been learning Haskell at the time and the concept of Finite State Machine came up time and again. It turns out I can utilize FSA to implement Regex Engines. So I did.\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nInstall through your favorite package manager to get started.\n\n### Installation\n\n   ```sh\n   npm install @rux12/t_rex\n   ```\n   ```sh\n   yarn add @rux12/t_rex\n   ```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\nBasic Usage:\n```ts\nimport {build} from \"@rux12/t_rex\";\n\nconst re = build(\"/(ab|cd)/\");\n\nre.matches(\"ab\") // true\nre.matches(\"cd\") // true\nre.matches(\"ef\") // false\n```\nYou could also use the builders provided.\n```ts\nimport {char, or} from \"@rux12/t_rex\";\n\nconst re = or(\n\tchar(\"a\"),\n\tchar(\"b\")\n);\n\nre.matches(\"a\") // true\nre.matches(\"b\") // true\nre.matches(\"e\") // false\n```\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [ ] Add Wildcard Support (for now)\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nEmail:  rux12@icloud.com\n\nProject Link: [https://github.com/Sangi-it/t_rex](https://github.com/Sang-it/t_rex)\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\n* [regex-tree](https://github.com/DmitrySoshnikov/regexp-tree)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsang-it%2Ft_rex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsang-it%2Ft_rex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsang-it%2Ft_rex/lists"}