Javascript String escapeRegExp()
String.prototype.escapeRegExp = function() { //return this.replace( /([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1" ); return this.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); };
String.prototype.escapeRegExp = function () { return this.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); };