{"id":13727058,"url":"https://github.com/ColinEberhardt/assemblyscript-regex","last_synced_at":"2025-05-07T22:30:49.190Z","repository":{"id":42966611,"uuid":"323872364","full_name":"ColinEberhardt/assemblyscript-regex","owner":"ColinEberhardt","description":"A regex engine for AssemblyScript","archived":false,"fork":false,"pushed_at":"2023-11-11T21:05:54.000Z","size":874,"stargazers_count":87,"open_issues_count":13,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T06:22:29.997Z","etag":null,"topics":["assemblyscript","regex","regex-engine","webassembly"],"latest_commit_sha":null,"homepage":"","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/ColinEberhardt.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}},"created_at":"2020-12-23T10:31:45.000Z","updated_at":"2024-12-31T12:41:30.000Z","dependencies_parsed_at":"2023-11-11T22:22:46.089Z","dependency_job_id":"c7ffe534-a832-4f0b-b74e-61dea6c88669","html_url":"https://github.com/ColinEberhardt/assemblyscript-regex","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEberhardt%2Fassemblyscript-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEberhardt%2Fassemblyscript-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEberhardt%2Fassemblyscript-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinEberhardt%2Fassemblyscript-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColinEberhardt","download_url":"https://codeload.github.com/ColinEberhardt/assemblyscript-regex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965186,"owners_count":21832835,"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":["assemblyscript","regex","regex-engine","webassembly"],"created_at":"2024-08-03T01:03:37.787Z","updated_at":"2025-05-07T22:30:47.671Z","avatar_url":"https://github.com/ColinEberhardt.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# assemblyscript-regex\n\nA regex engine for AssemblyScript.\n\n[AssemblyScript](https://www.assemblyscript.org/) is a new language, based on TypeScript, that runs on WebAssembly. AssemblyScript has a lightweight standard library, but lacks support for Regular Expression. The project fills that gap!\n\nThis project exposes an API that mirrors the JavaScript [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) class:\n\n```javascript\nconst regex = new RegExp(\"fo*\", \"g\");\nconst str = \"table football, foul\";\n\nlet match: Match | null = regex.exec(str);\nwhile (match != null) {\n  // first iteration\n  //   match.index = 6\n  //   match.matches[0] = \"foo\"\n\n  // second iteration\n  //   match.index = 16\n  //   match.matches[0] = \"fo\"\n  match = regex.exec(str);\n}\n```\n\n## Project status\n\nThe initial focus of this implementation has been feature support and functionality over performance. It currently supports a sufficient number of regex features to be considered useful, including most character classes, common assertions, groups, alternations, capturing groups and quantifiers.\n\nThe next phase of development will focussed on more extensive testing and performance. The project currently has reasonable unit test coverage, focussed on positive and negative test cases on a per-feature basis. It also includes a more exhaustive test suite with test cases borrowed from another regex library.\n\n### Feature support\n\nBased on the classfication within the [MDN cheatsheet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet)\n\n**Character sets**\n\n- [x] .\n- [x] \\d\n- [x] \\D\n- [x] \\w\n- [x] \\W\n- [x] \\s\n- [x] \\S\n- [x] \\t\n- [x] \\r\n- [x] \\n\n- [x] \\v\n- [x] \\f\n- [ ] [\\b]\n- [ ] \\0\n- [ ] \\cX\n- [x] \\xhh\n- [x] \\uhhhh\n- [ ] \\u{hhhh} or \\u{hhhhh}\n- [x] \\\n\n**Assertions**\n\n- [x] ^\n- [x] $\n- [ ] \\b\n- [ ] \\B\n\n**Other assertions**\n\n- [ ] x(?=y) Lookahead assertion\n- [ ] x(?!y) Negative lookahead assertion\n- [ ] (?\u003c=y)x Lookbehind assertion\n- [ ] (?\u003c!y)x Negative lookbehind assertion\n\n**Groups and ranges**\n\n- [x] x|y\n- [x] [xyz][a-c]\n- [x] [^xyz][^a-c]\n- [x] (x) capturing group\n- [ ] \\n back reference\n- [ ] (?\u003cName\u003ex) named capturing group\n- [x] (?:x) Non-capturing group\n\n**Quantifiers**\n\n- [x] x\\*\n- [x] x+\n- [x] x?\n- [x] x{n}\n- [x] x{n,}\n- [x] x{n,m}\n- [ ] x\\*? / x+? / ...\n\n**RegExp**\n\n- [x] global\n- [ ] sticky\n- [x] case insensitive\n- [x] multiline\n- [x] dotAll\n- [ ] unicode\n\n### Development\n\nThis project is open source, MIT licenced and your contributions are very much welcomed.\n\nTo get started, check out the repository and install dependencies:\n\n```\n$ npm install\n```\n\nA few general points about the tools and processes this project uses:\n\n- This project uses prettier for code formatting and eslint to provide additional syntactic checks. These are both run on `npm test` and as part of the CI build.\n- The unit tests are executed using [as-pect](https://github.com/jtenner/as-pect) - a native AssemblyScript test runner\n- The specification tests are within the `spec` folder. The `npm run test:generate` target transforms these tests into as-pect tests which execute as part of the standard build / test cycle\n- In order to support improved debugging you can execute this library as TypeScript (rather than WebAssembly), via the `npm run tsrun` target.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FColinEberhardt%2Fassemblyscript-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FColinEberhardt%2Fassemblyscript-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FColinEberhardt%2Fassemblyscript-regex/lists"}