Returns a copy of the string with all the tags removed - Node.js String

Node.js examples for String:String Value

Description

Returns a copy of the string with all the tags removed

Demo Code


/**/*  ww  w.  ja  va2s. c  om*/
 * returns a copy of the string with all the tags removed
 * @return String without tags
 */
stripTags: function() {
  return this.replace(/<\/?[^>]+>/ig, '');
},

Related Tutorials