by GordonS · 4y ago · 0 comments
Take the capturing groups sample, is this really meant to be an improvement?!
Rulex:
``` :([s]) :named([.]) ::named ```
Regex:
``` (\s)(?<named>.)\2 ```
An more accurate translation of the above into a (PCRE) regex would be
(\s)(?P<named>.)\k<named>
However, named backreferences aren't supported in JavaScript. Rulex makes sure that the emitted regex is correct and supported by the target regex flavor.