Here you can find the source of escapeRegExp()
String.prototype.escapeRegExp = function() { //return this.replace( /([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1" ); return this.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); };
function escapeRegExp(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); function unEscapeRegExp(str) { return str.replace(/\\(?!\\)/g,''); RegExp.escape = escapeRegExp; RegExp.prototype.escape = function(){ var flags = (this.global ? 'g' : '') + (this.ignoreCase ? 'i' : '') + (this.multiline ? 'm' : ''); ...
RegExp.escape = function(text) { return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); };
String.prototype.escapeRegExp = function(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
function escapeRegExp(string) { return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
helpers.escapeRegExp = function(string) { return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); };