how to split the serial number in string array
<p>i have the following code in dictionary</p>

<pre><code>SN00001002001
SN00001002002
SN00001002003
SN00001002004
 ...
AN00001002006
AN00001002007
AN00001002008. 
</code></pre>

<p>I want to display it as </p>

<pre><code>SN00001002 001-006  6(count)
AN00001002 001-008  8(count)
</code></pre>

<p>i used the following code</p>

<pre><code>Dictionary&lt;object, int&gt; counts = new Dictionary&lt;object, int&gt;();

            foreach (string item in str1)
            { 
               if (!counts.ContainsKey(item1))
                    {
                        counts.Add(item1, 1);                           
                   }                    }
                else
                {
                    counts[item]++;                        
                }
            }
</code></pre>

<p>it displays the counts correctly as    </p>

<pre><code>SN00001002   6(count)
AN00001002   8(count)
</code></pre>

<p>, but not with the serial no. can any one suggest an idea for this.</p>
