Use capturing groups

Convert digits to \d

Escape non-ASCII characters

Ignore capitalization

Convert repeated substrings to {min,max}

Convert whitespace to \s

Multi-line output

Convert any Unicode word character to \w

And grex will generate a matching pattern.