I have a nested ul, li list in my html. How can i get the regex from ul to the end of ul node. In this example below i need to get 2 matches.
First one should be
<ul>
<li>This is First List</li>
<li>This is Second List</li>
<ul>
<li>This is Second UL First List </li>
<li>This is Second UL Second List </li>
</ul>
<li>This is Third List</li>
</ul>
and the second one should be
<ul>
<li>This is Next List</li>
<ul>
<li>This is Test </li>
</ul>
<li>This is Third List</li>
<ul>
<li>This is Test </li>
</ul>
</ul>
My HTML code:
<html>
<p> This is First Paragraph </p>
<ul>
<li>This is First List</li>
<li>This is Second List</li>
<ul>
<li>This is Second UL First List </li>
<li>This is Second UL Second List </li>
</ul>
<li>This is Third List</li>
</ul>
<p> This is Second Paragraph </p>
<ul>
<li>This is Next List</li>
<ul>
<li>This is Test </li>
</ul>
<li>This is Third List</li>
<ul>
<li>This is Test </li>
</ul>
</ul>
</html>