Regex .match -> .test for just true/false, .indexOf for simple tests

Just to make the code a bit simpler.