how to get innerhtml with nested tags using regex
Example:
<div class="def">
<ul>
<li>..</li>
<li>..</li>
</ul>
</div>
<div class="def">
<ul>
<li>..</li>
<li>..</li>
</ul>
</div>
I need only the first div content of this code
"(?s)(<div\\sclass=\"def\">(.+)<\\/div>)"
when ever i use this code i get both the div contents
How to get just the first one alone ?
Please help...