title: VBScript to sort lines in a file
body: <p>I'm trying to sort lines in a file using VBScript (MS Internet Explorer). Basically I read the file and converted all the lines to an array. Basically I need to sort on whatever is written between character 23 and 27 of each line. So basically I can get those characters using <code>MID</code>. These characters are not unique per line (so I can't use <code>System.Collections.Sortedlist</code> directly, or something similar unfortunately).</p>
  
  <p>I may be able to use <code>System.Collections.Sortedlist</code> and use the characters between 23 and 27 as a key and use an other <code>System.Collections.Sortedlist</code> object as a value, filled with every unique value (so a 2-dimensional array), but will this be the right way? e.g.:</p>
  
  <pre><code>(System.Collections.Sortedlist) {
      "0001" =&gt; (System.Collections.Sortedlist) {
          0 =&gt; "0001 some unique value1"
          1 =&gt; "0001 some unique value2"
          2 =&gt; "0001 some unique value3"
      },
      "0002" =&gt; (System.Collections.Sortedlist) {
          0 =&gt; "0002 some unique value1"
          1 =&gt; "0002 some unique value2"
          2 =&gt; "0002 some unique value3"
      }
  }
  </code></pre>
  
  <p>Is there a better way to handle this?
  Also note the output format should be an array again.</p>