title: regex php - find things in div with specific ID
body: <p>I'm sure this is an easy one, and as much as I've googled and searched here on SO - I can't seem to figure out what is wrong with this.  I have other areas on this page where I use similar expressions that return exactly what I want.</p>
  
  <p>However, I can't get this particular bit to return what I want, so maybe someone can help me.</p>
  
  <p>I have a div with a specific ID "user-sub-commhome" - I want to pull out the text from within that div.  The text is surrounded by  tags but I can easily use strip_tags to get those gone.  I'm using regex to try and pull the data out.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$intro = "&lt;div id="user-sub-summary"&gt;Summary&lt;/div&gt;
  &lt;div id="user-sub-commhome"&gt;&lt;em&gt;Commercial&lt;/em&gt;&lt;/div&gt;
  &lt;div id="whatever"&gt;whatever&lt;/div&gt;";
  
  $regex = '#\&lt;div id="user-sub-commhome"\&gt;(.+?)\&lt;\/div\&gt;#s';
  preg_match($regex, $intro, $matches);
  $match = $matches[0];
  echo $match;
  </code></pre>
  
  <p>I've tried changing things with no success, nothing seems to work to echo anything.  So I'm hoping some power that be who is much more experienced with regex can help.</p>