title: How to remove all script tags from html file
body: <p>How do I remove all script tags in html file using sed?</p>
  
  <p>I try with this but doesn't work, the command below doesn't remove any script tag from <code>test1.html</code>.</p>
  
  <pre><code>$ sed -e 's/&lt;script[.]+&lt;\/script&gt;//g' test1.html &gt; test1_output.html
  </code></pre>
  
  <p>My goal is from test1.html to test1_output.html</p>
  
  <p><em><code>test1.html</code></em>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;My Website&lt;/h1&gt;
  
          &lt;div class="row"&gt;
              some text
          &lt;/div&gt;
  
          &lt;script  type="text/javascript"&gt; utmx( 'url', 'A/B' );&lt;/script&gt;
  
          &lt;script src="ga_exp.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;    
          &lt;script type="text/javascript"&gt;
              window.exp_version = 'control';
          &lt;/script&gt;        
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><em><code>test1_output.html</code></em>:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;My Website&lt;/h1&gt;
  
          &lt;div class="row"&gt;
              some text
          &lt;/div&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>