add regexps to constants
pre-compile regular expressions for faster pattern checks
Merge pull request #8 from attilaolah/regexp

Pre-compile regexes