Javascript String regexEscape()
regexEscape()
String.prototype.regexEscape = function() { return this.replace(/([\\\/\$\.\*\(\)\[\]\|])/g,'\\$1'); };