in reply to Sorting a text file
If you're on a *nix platform (or have cygwin on MS), I would just use the sort command for complicated sorting:
$ sort -k 1.10,1.14 <filename> [download]