Closed freddieventura closed 3 years ago
XRegExp already supports linebreaks via flag x
, like PCRE. It does not support DEFINE blocks and subpattern reuse via (?&name)
, but there is an existing issue at #190 covering those (which also describes how they might be implemented).
I don't expect to get to implementing this since it would require substantial changes to the core of XRegExp regex generation and translation into native JS regex syntax. But pull requests are welcome.
Also note that most of the use cases for DEFINE blocks and subpattern reuse are already enabled by XRegExp.build
and XRegExp.tag
.
Hi, First of srry for my brevity but I have tendinitis so Im just writting with one hand. Due to this tendinitis I wanted to get the maximum off my keystrokes by using a PCRE compliant , Regexp library in JS , so I can use DEFINES and linebreaks in the RegExp such as https://stackoverflow.com/questions/36125759/pcre-define-statement-for-lookarounds#36130814
I'm happy so far using your libary , but I have
invalid group
when attempting to use define , or the Macros for groups(?<mygroup>)(?&mygroup)
none of them are working. If you dont offer such a functionality It would be nice if you include it so we can get closer to PCRE on JS.
Thank you,