Transductive regular expressions for text editing

TRRE is a prototype extension of regular expressions for text editing. Despite regular expressions being ideal for pattern searching, they can feel unnatural for text editing due to complicated group logic. TRRE introduces the : symbol for defining transformations, with the simplest form being a:b to replace a with b. For example, changing ‘cat’ to ‘dog’ is expressed as ‘c:da:ot:g’. TRRE can be used for deletion, insertion, and even creating a Caesar cipher. It operates similarly to grep -E and supports generators for multiple output strings for a single input. While TRRE has impressive capabilities, it’s advised not to use it in production.

https://github.com/c0stya/trre

To top