Data as of Jul 25, 2026 · Based on 2,718,867 AI responses across 9,511 prompts · See how Parse measures this
regexgen is a JavaScript library that generates regular expressions designed to match a specified set of strings, offering both a simple API and a CLI. It builds a Trie from the input strings, minimizes the resulting DFA with Hopcroft's algorithm, and converts the DFA to a regex via Brzozowski's algebraic method, producing a RegExp object (default JS regex with UCS-2 surrogates or, with -u, an ES2015 Unicode regex). It can be used by passing an array of strings to regexgen or by using the Trie class directly, and it is licensed under MIT.
Parse Score