function escapeRegExp(str) {
    return str.replace(regexUnescaped, '\\$&');
}
Quotes regular expression characters.

@param  {string} str - The input string.
@return {string} Returns the quoted (escaped) string.