How to find a string between two begin and end strings in ASP.NET using C#?
<p>How to find a string between two begin and end strings in MVC4?</p>

<p>some examples:</p>

<pre><code>D1 =&gt; D1 (result)
D1-D3 =&gt; D1,D2,D3 (result)
D5-D6 =&gt; D5,D6 (result)
D4-D7 =&gt; D4,D5,D6,D7 (result)
</code></pre>
