regexp-tree
regexp-tree copied to clipboard
fix: add support for `hasIndices` `/d` regex flag
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 of the substrings of each capture group. It does not change the regex's interpretation or matching behavior in any way, but only provides additional information in the matching result.
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices