txt2regex (interactive regular expression trainer) Txt2regex is a regular expression wizard for the command line. Users with little or no knowledge of regular expressions can quickly create hairy regexes by answering questions in a simple text-based interactive interface. Txt2regex is aware of the particular notation and caveats of many different regular expression flavors, generating valid regexes for more than 20 targets, including grep, sed, Vim, Emacs, JavaScript, Python, PHP, PostgreSQL.