Question : perl regexp with div tags and space

I  am trying to parse the string from an html file:
1:
2:
3:
4:
 <div class="entry-body"> 
                              <p>LOTS OF TEXT</p> 
                           </div> 


This works:
($text) = ($content =~ m|<div class="entry-body">(.+)</p>|s);

but I want to match on the last <div> tag not on the <p>.  The above should be verbatim.  So I think I'm getting stuck on the space/newline here, because it seems like any combination of \s, \n .+ with the </div> tag doesn't work. Any idea what I'm doing wrong here?

Answer : perl regexp with div tags and space

You need to add the multi-line flag..
1:
($text) = ($content =~ m|<div class="entry-body">(.+)</div>|sm); 
Random Solutions  
 
programming4us programming4us