It seems to me that Mark B’s solution 3 is getting you closest to what you want to do.
The following is tentative, so please ignore if you don’t find it helpful or if I’ve missed something obvious, but…
As far as can see from your other post, if you take away the commas, your numbering scheme is actually just a regular sequence of numbers and letters. If you made the following changes:
a) all numbers are given leading zeroes (the further down the hierarchy, the fewer zeroes are needed), and;
b) you translate the numbers with commas into decimal numbers, while giving the numbers without commas a .0 number, then
you’d be able to sort on the UUID.
e.g. the following numbers from your current scheme are not currently sorted properly, but if you made the translation (to the number after ->)
- 0_11,2a5 -> 0_011.2a05
- 0_1,3a5 -> 0_001.3a05
- 0_1a5b7a -> 0_001.0a05b07a
- 0_2a5f3g1 -> 0_002.0a05f03g01
and will sort in the Finder as follows
- 0_001.0a05b07a
- 0_001.3a05b3
- 0_002.0a05f03g01
- 0_011.0a05
which is what you’re after (I think)…
(If you have commas at levels below the first one, then you’d repeat the ‘make it a decimal’ trick.)
Obviously, it doesn’t matter whether you think you’ll need the ‘decimal’ numbers as 001.1 or 001.001, as long as you do the same thing every time.
The example you give from Luhmann would simply be 021/003.0d026g053
, which is sortable and extensible.
If you were starting from scratch, wouldn’t this work for you? I may have missed something obvious, of course.
But you need to get there from where you are… This would be a really complicated regular expression to do in one go, but it could be done as a series of fairly simple conversions, I think, and once you’ve done the conversion, then you can simply continue with the new format. You can add new levels arbitrarily as you go on, as long as you stick to leading zeroes for numbers.
How may cards do you have now?
Sorry if I’ve missed something…