To remove the block inside a <script> element, use the [\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