Hi.

I am getting a string of seats that looks like this:

"1|11|25|1|1|0000000001|0|0|Y|Main||9|10|A|2002020N01903020M01804020L01706020J01607020I01508020H0140 9020G0130A020F0120B020E0110C020D0100D020C090E020B080F020A070G0209060H0208050I0207040K0205030L0204020 M0203010N02020|9|B|2002030N01903030M01804030L01706030J01607030I01508030H01409030G0130A030F0120B030E0 110C030D0100D030C090E030B080F030A070G0309060H0308050I0307040K0305030L0304020M03030|8|C|2101040O02002 040N01903040M01804040L01706040J01607040I01508040H01409040G0130A040F0120B040E0110C040D0100D040C090E04 0B080F040A070G0409060H0408050I0407040K0405030L0404020M0403010N04020|7|D|2101050O02002050N01903050M01 804050L01706050J01607050I01508050H01409050G0130A050F0120B050E0110C050D0100D050C090E050B080F050A070G0 509060H0508050I0507040K0505030L0504020M0503010N05020|6|E|2101060O02002060N01903060M01804060L01706060 J01607060I01508060H01409060G0130A060F0120B060E0110C060D0100D060C090E060B080F060A070G0609060H0608050I 0607040K0605030L0604020M0603010N06020|5|F|2101070O02002070N01903070M01804070L01706070J01607070I01508 070H01409070G0130A070F0120B070E0110C070D0100D070C090E070B080F070A070G0709060H0708050I0707040K0705030 L0704020M0703010N07020|4|G|2101080O02002080N01903080M01804080L01706080J01607080I01508080H01409080G01 30A080F0120B080E0110C080D0100D080C090E080B080F080A070G0809060H0808050I0807040K0805030L0804020M080301 0N08020|3|H|2101090O02002090N01903090M01804090L01706090J01607090I01508090H11409090G1130A090F5120B090 E5110C090D0100D090C090E090B080F090A070G0909060H0908050I0907040K0905130L0904120M0903110N09021|2|J|210 10A0O020020A0N019030A0M018040A0L016070A0I115080A0H114090A0G1130A0A0F1120B0A0E0110C0A0D0100D0A0C090E0 A0B080F0A0A070G0A09060H0A08040K0A05030L0A04020M0A03010N0A020"

You will see that after Main||9|10|A|. So Starting, let's take a little sample after |A| . "2002020N01903020M01804020L01706020J0" .Analyzing this we get:

2chars for the seat number(20),2char for the seat allocationNum(02), 2char + 2char for the XY position( 02 + 0N) + 1 char for status (0).

So the first bunch would be "2002020N0", the second "1903020M0" etc. There was an older version that did not include the seat and had 7 chars so i divided by 7 to get the total seats of the row. Now i supposedly will divide by 9 as we have 9 chars per session. Now starts the trouble. If you look after the 10 seat the problem is that the 9th seat is not represented by 09 but with 9, hence I character. Are you starting to see the stupidity of the situation? "90E020B080F020A0" It gets 8 characters!!! So everything is messed up. If i try to get the seat number I will get 90 and 80 instead of what they supposed to do (09,08) so I can get 08 and 09, also since there is characters missing the division will fail badly.

What I want to do, if possible is insert the missing data. So 9 will be 09, to will be 08 etc. The problem is that it's not unique, meaning 9 -09 appears everywhere in the string, and this is not a default string. It may start with 8 seats so it won't be , first seat 20 2nd seat 19 etc.

I literal don't have a clue on what I can do. How can i "sneak" the zeros in from of the single characters so I can make the string correct?

Any help would be appreciated.

This is a .net 2.0 framework