Use RegExp.test() instead of match()