title: sed substitute does not quite work as expected
body: <p>I am executing a shell script where i should replace string in a file. So of course i am using <code>sed</code> for that. The string is something like:</p>
  
  <pre><code>&lt;!--replace--&gt;
  &lt;script src="1.js"&gt;&lt;/script&gt;
  &lt;script src="2.js"&gt;&lt;/script&gt;
  &lt;!--/replace--&gt;
  </code></pre>
  
  <p>This should be replaced with:</p>
  
  <pre><code>&lt;script src="3.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>So i am trying to do it as follows:</p>
  
  <pre><code>$ sed "s/&lt;\!--replace--&gt;.\*&lt;\!--\/replace--&gt;/&lt;script src=\"3.js\"&gt;&lt;\/script&gt;/g" file.html
  </code></pre>
  
  <p>But this does not do the trick. What am i missing?</p>
  
  <p>UPD: Removing <code>\n</code> from file is not a solution in this case, simply because file should be readable.</p>