Added check for invalid regexes
Merge pull request #231 from pimterry/spot-bad-regex

Added check for invalid regexes

LGTM, Thanks.