我有一个带有JavaScript和CSS代码块的HTML字符串:
<script type="text/javascript">
alert('hello world');
</script>
<style type="text/css">
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: underline; color: red;}
</style>
如何去除这些块?有什么建议可以用来删除它们的正则表达式吗?
<script>
标签和<style>
标签不能有嵌套标签。 - Elian Ebbing