evil regex is evil

Fix the evil, highly ReDoSable regex.

Shame on me for introducing this in the first place.
Merge pull request #52 from auscompgeek/patch-2

Merging regex fixes.