Rename API escapeReg to escapeRegExp.