Strip script from String - Node.js String

Node.js examples for String:Strip

Description

Strip script from String

Demo Code

String.prototype.stripScripts = function()
{
    return this.replace(new RegExp('<script[^>]*>([\\S\\s]*?)<\/script>', 'img'), '');
};

Related Tutorials