remove tags appearing at the end of a string
<p>How can we remove tags appearing at the end of the string?</p>

<pre><code>Input
    String test ="test string&lt;.div class="og&gt;&lt;/div..&gt;" 

outPut 
  String test ="test string";
</code></pre>

<p>while printing I only want <code>test string</code>. Some times at the the string test contains tags other than div tag. How to resolve this?</p>
