in reply to Re^2: Data with Letter(s) & Number sort query
in thread Data with Letter(s) & Number sort query

No, padded is supposed to be implemented by merrymonk, as I understood it that they had the padding already but wanted to undo it after sorting.

Replies are listed 'Best First'.
Re^4: Data with Letter(s) & Number sort query
by merrymonk (Hermit) on Nov 19, 2016 at 11:42 UTC
    Sorry I gave the wrong impression. I added the 0 before numbers less than 1000 manually. I guess I could create such a function but it would be 'nice' to avoid that.

      Then something like the matching given by Laurent_R below and johngg as well are likely the best approach. Basically, you match your sort keys in the string, then pack or sprintf them into a (fixed-length) prefix to your string, let sort do its thing, and then remove the prefix again.