DRY with a Regexp.
Merge pull request #9 from Erol/master

DRY with a Regexp.