Cleaned up the code while at it by de-duplicating the regex.
Merge pull request #6 from AaronVanGeffen/master

Cleaned up the code while at it by de-duplicating the regex.