Last html tags in html string in java : I have HTML string and want to get last closing tags.
e.g.

<h1>
   <p>some text</p>
<p>
  <ol>
   <li>item1Text</li>
  <ol>
</p>
</h1>




I want to insert a button after `item1Text`, thus I need to find 
last tags in the html string, in this case it is `</li><ol></p></h1>`