Extract two substrings from a string
<p>what is the best and optimise wayto extract substrings from a specified string.</p>

<p>my primary string is like </p>

<pre><code>string str = "&lt;ABCMSG&gt;&lt;t&gt;ACK&lt;/t&gt;&lt;t&gt;AAA0&lt;/t&gt;&lt;t&gt;BBBB1&lt;/t&gt;&lt;/ABCMSG&gt;"; 
</code></pre>

<p>where the value <code>AAA0</code> and <code>BBBB1</code> are not contstant. it is dynamic value collected from somewhere.</p>

<p>i need to extract AAA0 and BBBB1 here.</p>

<p>please suggest me if any function or optimize way to do this.</p>

<p>thank you!</p>
