The Number is the unique key for the data.
Having written this problem down, and examined it as I try to explain it :), I have decided to attempt this approach:
- Remove all blank lines.
- Find the index and grab 70 lines (-2..68).
- Split the data into three sections.
- Deal with section overlaps.
The three sections are:
- All lines up to (but excluding) the first line with a colon.
- All lines with a colon.
- The rest.
Count 'The rest' and move that many lines from section 2 into (preceding) section 3.
This should help sort the data.
<a href="http://www.graq.co.uk">Graq</a>