DEV Community

Discussion on: Introducing fancy-regex - JS/TS regexes with whitespace, comments, and interpolation!

Collapse
 
learnbyexample profile image
Sundeep

See also github.com/slevithan/xregexp which provides these features and many more like named backreferences, recursive matching, etc.

Collapse
 
lionelrowe profile image
lionel-rowe • Edited

Nice! Named capture groups and named backreferences are now supported in vanilla JavaScript too, with great support among evergreen browsers (no IE, though).

My goal with fancy-regex is to be a really lightweight wrapper around native regexes. It will never have all the features of something like XRegExp, certainly not anything like recursive matching.