grex is a library as well as a command-line utility that is meant to simplify the often complicated and tedious task of creating regular expressions. It does so by automatically generating a single regular expression from user-provided test cases.
https://github.com/pemistahl/grex
Comme le soleil, les machines ne se couchent jamais.