Javascript String regexEscape()

Description

Javascript String regexEscape()


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



PreviousNext

Related