Reputation: 1272
How can I get content of a DIV using regular expression. What I need to get is in between;
<div class="lv1right dfbg">......</div>
Also there are several (not well defined) tags between these div tags, and I would like to get all of them..
Thanks in advance...
Upvotes: 0
Views: 1395
Reputation: 272237
I'd avoid using regexps for HTML, since HTML isn't regular. Instead check out this PHP DOM parser, which will allow you to extract/change the HTML much more reliably.
Upvotes: 6