Hacker News new | ask | show | jobs
by wyantb 4669 days ago
I may as well make one suggestion along these lines ( implemented in a similar JS library I whipped up not too long ago: https://github.com/wyantb/js-regex ).

Macros! https://github.com/wyantb/js-regex#macros

Given some named macro, whenever the user wants to use it, they use addMacro (or some analogous method).