<script> एलिमेंट के अंदर ब्लॉक को हटाने के लिए, [\s\S]*? का उपयोग करें:
<script> /* <![CDATA[ */ var A=new Array(); /* ]]> */ </script>
Demo Text Demo Text Demo Text
<script type="text/javascript"> /* <![CDATA[ */ var B=new Array(); Demo Text Demo Text /* ]]> */ </script>
Demo Text