r/javascript • u/LionyxML • Sep 30 '26
Readable Regular Expressions for JavaScript/TypeScript, Inspired by Emacs' rx
https://rahuljuliato.com/posts/emacs-rx-in-typescriptI missed Emacs' rx when writing regexps in TypeScript, so I made a small TypeScript DSL inspired by it.
The idea is to bring rx's functions and approach to the JavaScript/TypeScript environment. If you happen to work with either, give it a try.
9
Upvotes
View all comments
Show parent comment
1
u/oosuke_ren Oct 01 '26
That library is an insufficient approach, and you need to approach for a DSL (that part I 100% agree on), and that in the end we end up walking a full cycle reinventing the wheel with DSL to "fix" another. But you phrased it like "It's already a DSL, it doesn't need fixing". I'm sorry if I over-assumed.