>We name a record with field x simply a record.
>
>Any record with a non numeric infront of the first or none dot is trailing any record with numerics in front of first or none dot.
>Numerics and non numerices should not be mixed with in a group delimited by dots.
>Numerics should be orderd numerical.
>Non numerics could be any letter [A..Z]+ and should be ordered like numericals A,B,AA,AB, AAC (there is a small chance to talk customer into alphabetical order, because AA is not very likely)
>With in the order given above the following groups should follow this. It's high probalility to have just groups of
.1 and
.R now, but I don't like to run in it the other day.
You can padl() everything with spaces - numerics, strings... so
padl(1,3)=" 1"
padl("A", 3)=" A"
padl("AA", 3)=" AA"
You'd need to calculate the max number of dots and max width of a between-the-dots segment, and then have a long enough string which would fit the padded version (with or without dots)... see if this would work:
1 " 1"
1.1 " 1 1"
1.1.R " 1 1 R"
1.R " 1 R"
1.R.1 " 1 R 1"
2 " 2"
03 " 03"
5.R " 5 R"
10 " 10"
12.R " 12 R"
A " A"
B " B"
AA " AA"
Mmmm... the 03 is spoiling the fun. Perhaps padl(chunk, 3, "0") would work.