title: regular expression to find HTML Comment ( <!-- some string --> )
body: <p>I use this regexp to find and replace an HTML comment traditionally:</p>
  
  <pre><code>//remove HTML comments
  $HTML = preg_replace('/&lt;!--(.|\s)+?--&gt;/','',$HTML);
  </code></pre>
  
  <p>However, on one server that's apparently crashing (works fine on my VM but it's pretty high powered).</p>
  
  <p>The logic is, start the comment, any character or whitespace (at least some = +), and the <code>?</code> means "don't be greedy and stop at the first --> you get"</p>
  
  <p>Is there a better way to write this, esp. the <code>(.|\s)+?</code> part?</p>