How can I remove the (//<![CDATA[ , //]]>) blocks; tags inside a script element in Javascript?

JavascriptWeb DevelopmentFront End Technology

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
raja
Updated on 30-Jul-2019 22:30:22

Advertisements