Proposed fix for issue #173
RegExp.test is way faster than RegExp.exec
Merge pull request #174 from mephux/issue173

Proposed fix for issue #173