title: A regex to remove whitespace and line breaks from HTML document
body: <p>I am using this regular expression to remove white space and line breaks from a HTML document.</p>
  
  <p>However, it doesn't seem to handling line breaks very well.</p>
  
  <pre><code>preg_replace('/(?:(?&lt;=\&gt;)|(?&lt;=\/\&gt;))(\s+)(?=\&lt;\/?)/', '', $HTML);
  </code></pre>
  
  <p>How can I improve the above?</p>
  
  <p>I am only trying to remove spaces between beginning and end of HTML tags.</p>