News for hackers. Stuff that matters.
Re:A portable, modern regular expression language by sulami on Friday December 30, 2022 @09:30AM (#34185312)
I had a similar kind of idea for a long time, which I put into action a few weeks ago via a standalone transpiler of Emacs' rx macro to common regexp syntaxes.[0] I ended up getting interrupted and didn't completely finish it, but it generally works, though is probably riddled with edge cases.

The basic idea of rx is to use S-expressions to describe regular expressions, and my elevator pitch would've been to embed rx invocations in shell scripts using $(syntax), the main use case being something like sed invocations.

I still think it's a neat idea, and complex regular expressions tend to be hard to parse for humans.

[0]: https://github.com/sulami/rx

There are no comments on this comment yet.