日期:2014-05-17 浏览次数:20431 次
Htmlstring = Regex.Replace(Htmlstring, @"(?is)<script\b[^>]*>(.*?)</script>", string.Empty, RegexOptions.IgnoreCase);
------解决方案--------------------
string js = @"asdf
<script>
alert
</script>
asdfads
<Script type=''>alert<script>asdfasdf
";
js= Regex.Replace(js,@"\<\s*script(\s|.)*?script\s*\>","",RegexOptions.IgnoreCase);