需要正则表达式才能正确解析脚本标记。我试着用
/<script([^>]*)>(.*)<\/script>/iUsg
,但它匹配脚本标记内的字符串内的脚本标记。请帮忙!
我需要匹配的示例代码:
<html>
<script>
var = '<script></script><div>'
</script>
<div>423434</div>
<script type="text/javascript">
var b = "<script type='javascript.1.1'></script>";
</script>
</html>