replace String.match with RegExp.test