Use the string.match regex instead of RegExp.