Fixed regex safety check
Merge pull request #3 from ameyjah/patch-2

Fixed regex safety check