JS去除字符串script标签内容的正则

function clearDomScriptTag(s) {
  var reg=/<script[^<]*(?:(?!</script>)<[^<]*)*</script>/gi; //生成相关正则信息
  s = s.replace(reg, "");//忽略大小写的正则
  return s;

}
原文地址:https://www.cnblogs.com/felixwan/p/14858293.html