Show HN: Strans – Sed alternative that automatically learns from examples

Show HN: Strans – Sed alternative that automatically learns from examples

We create a file called

And, voila, the output is

Note how adds the second example and generates a global transformation rule that satisfies all examples given to it. An alias (in your bashrc, …) can make integrate seamlessly in a Unix environment:

uses program-by-example techniques from Microsoft PROSE to come up with the rules behind this string manipulation. PROSE allows the creation of extremely complex string transformations within a matter of a few seconds by just giving easy-to-write examples.

Source: github.com