AltBrains | voicecli

grex automatically creates regexes from test cases

This sounds pretty cool. Available on github or via Homebrew, scoop, or cargo.

Basic usage is grex -f [samplefile]

Written in Rust.

The README explains how it works:

A deterministic finite automaton (DFA) is created from the input strings.

The number of states and transitions between states in the DFA is reduced by applying Hopcroft’s DFA minimization algorithm.

The minimized DFA is expressed as a system of linear equations which are solved with Brzozowski’s algebraic method, resulting in the final regular expression.

Related content

Content type: news

Tags: grep,regex