modernise regex and tr a bit
fix erroneous `\2` in tr
Merge pull request #45 from auscompgeek/master

Merging TR/RE changes