c# getting a string within another string
<p>i have a string like this:</p>

<pre><code> some_string = "A simple demo of SMS text messaging.\r\n+CMGW: 3216\r\n\r\nOK\r\n\"
</code></pre>

<p>im coming from vb.net and i need to know in c#, if i know the position of CMGW, how do i get "3216" out of there?</p>

<p>i know that my start should be the position of CMGW + 6, but how do i make it stop as soon as it finds "\r" ??</p>

<p>again, my end result should be 3216</p>

<p>thank you!</p>
