regexp-tree icon indicating copy to clipboard operation
regexp-tree copied to clipboard

Regular expressions processor in JavaScript

Results 47 regexp-tree issues
Sort by recently updated
recently updated
newest added

The `u` flag should already be implemented by most of the engines, however, there are still old engines which do not implement it, so it'll still be nice to have...

Some utils might be useful to abstract away a boilerplate users have to do if they want to keep an AST consistent after some modifications. Example: all capturing groups have...

See . Per ES6, `/\W/iu` was equivalent to `/[^0-9a-jl-rt-zA-JL-RT-Z_]/u`, and [engines implemented it that way](https://github.com/tc39/ecma262/pull/525#issuecomment-228016109). This was fixed in the spec in [June 2016](https://github.com/tc39/ecma262/pull/525#issuecomment-228016109). Now, `/\W/iu` is equivalent to `/[^0-9a-zA-Z_\u{017F}\u{212A}]/u`....

Currently the code base is not statically type checked, we can use [Flow](https://flow.org/) type checker to validate it. (actually, this will require another build step with transpiling JS code --...

The `hasIndices` or `/d` regex flag is part of ES2022. > The `d` flag indicates that the result of a regular expression match should contain the start and end indices...

Would it be possible to offer ESM versions of regexp-tree and its modules, in addition to the current CommonJS? It would be great to be able to use `import` with...

ES2024's `v` flag (`unicodeSets`, an upgrade to flag `u`) has been supported since Node.js 20 and [2023-era browsers](https://caniuse.com/mdn-javascript_builtins_regexp_unicodesets). Currently, regexp-tree cannot parse the `v` flag, and as far as I...