title: Regular Expression to extract content from inside div
body: <p>I am trying to extract from a webpage which has the following markup</p>
  
  <pre><code>&lt;div id="div"&gt;
      content
      content
      content
      content
  &lt;/div&gt;
  </code></pre>
  
  <p>The regex I currently have is </p>
  
  <pre><code>Pattern div = Pattern.compile("&lt;div id=\"div\"&gt;(.*?)&lt;/div&gt;");
  </code></pre>
  
  <p>This works when there is only one line but with new lines it doesn't recognise stuff inside the div tag..</p>
  
  <p>Any help will be grateful (I am using java by the way)</p>