grex is a small command-line utility that is meant to simplify the often complicated and tedious task of creating regular expressions. It does so by automatically generating regular expressions from user-provided input strings that match the generated expression.
- detection of common prefixes and suffixes
- alternation using
- repetition using
- concatenation of all of the former
How to use
$ grex -h grex 0.1.0 Peter M. Stahl <email@example.com> grex generates regular expressions that match user-provided input strings. USAGE: grex <input>... FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: <input>...
$ grex abc def abc|def $ grex a ab abc a(bc?)? $ grex thankful thoughtful th(ought|ank)ful $ grex 2.0-3.5 2.5-6.0 2\.(0\-3\.5|5\-6\.0)