title: How can I grab the entire content inside `<body>` tag with regex?
body: <p>How can I grab the entire content inside <code>&lt;body&gt;</code> tag with regex?</p>
  
  <p>For instance,</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;a href="#"&gt;xx&lt;/a&gt;&lt;/p&gt;
  
  &lt;p&gt;&lt;a href="#"&gt;xx&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt; 
  </code></pre>
  
  <p>I want to return this only,</p>
  
  <pre><code>&lt;p&gt;&lt;a href="#"&gt;xx&lt;/a&gt;&lt;/p&gt;
  
  &lt;p&gt;&lt;a href="#"&gt;xx&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>Or any other better ideas? maybe DOM but I have to use <code>saveHTML();</code> then it will return <code>doctype</code> and <code>body</code> tag...</p>
  
  <p><a href="https://stackoverflow.com/questions/6891416/an-alternative-to-php-tidy">HTML Purifier</a> is a pain to use so I decide not to use it. I thought regex could be the next best option for my disaster.</p>