Extract regexes
Merge pull request #42 from Zearin/refactor/extract-regexp

Extract regexes