且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

删除<脚本>使用C#HTML页面标签

更新时间:2023-12-05 18:46:46

它可以使用正则表达式来完成:

It can be done using regex:

Regex rRemScript = new Regex(@"<script[^>]*>[\s\S]*?</script>");
output = rRemScript.Replace(input, "");