Javascript String escapeRegExp(str) {

Description

Javascript String escapeRegExp(str) {



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



PreviousNext

Related