Replaces String.match calls with RegExp.test where match details are not needed.