{"id":"jsdotlua/regex","name":"regex","scope":"jsdotlua","platform":"roblox","description":"https://github.com/jsdotlua/regex-lua","version":"1.0.2","latest":"1.0.2","versions":["1.0.0","1.0.1","1.0.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"jsdotlua/luau-polyfill":{"version":"^1.2.3","alias":"LuauPolyfill"}},"integrity":"8a326a624a960e994bba901ccb2d731e125b7ec5467fc0edc3ddfcc4da393992","likes":0,"downloads":0,"install":"forest install jsdotlua/regex","url":"https://forest.dev/p/roblox/jsdotlua/regex","files":"https://api.forest.dev/ai/package/roblox/jsdotlua/regex/files","readme":"<img src=\"https://raw.githubusercontent.com/jsdotlua/branding/main/Logo.png\" align=\"right\" height=\"128\"/>\n\n<h1>RegEx Lua</h1>\n<h3>A runtime-agnostic RegEx interface for Lua.</h3>\n\n<a href=\"https://github.com/jsdotlua/regex-lua/blob/main/LICENSE.md\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"license\" height=\"18\"></a>\n\n---\n\nThis library provides a standard RegEx interface (mirroring the JavaScript API) and attempts to call out to native RegEx APIs if provided by the Lua runtime. If no native RegEx API is provided, it will fall back to an in-Lua RegEx implementation.\n\n## API\n\nThe API mirrors JavaScript (docs for which can be found [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions)).\n\n```lua\nlocal RegEx = require(...)\n\n-- NOTE: The multi-line string syntax is required to support the `\\` syntax!\nlocal myRe = RegEx.new([[/d(b+)d/]], \"g\");\nlocal myArray = myRe:exec(\"cdbbdbsbz\");\n```\n\n## API Status\n\nThe following table shows which JavaScript RegExp features are supported in each runtime. If you require a specific RegEx feature and it is not supported then please submit and issue or make a pull request!\n\n| Runtime  | `exec()` | `test()` | `match()` | `matchAll()` | `search()` | `replace()` | `replaceAll()` | `split()` |\n| -------- | -------- | -------- | --------- | ------------ | ---------- | ----------- | -------------- | --------- |\n| Fallback | ✅        | ✅        | ❌         | ❌            | ❌          | ❌           | ❌              | ❌         |\n","readmeTruncated":false}