replace .match with .indexOf, see for performance http://jsperf.com/exec-vs-match-vs-test-vs-search/21