Lets get some things cleared first.
You want to SORT them, you want to RENAME them ???
make use of the help, it's pretty good to help solving such issues.
I'll give some hints, hopefully allowing you to solve it, since it you managed to solve the problem yourself with hints, it's your goal, and you'll be much more happy againt having simply copied a bunch of lines which do tell you nothing at all.
If you did follow suggestion 1 you might already have been stumbled about placeholders such as %artist%, %_filename%, %title%, ....... and now pure guess you could replace 'STRING' with the one you think is the most sensefull one being used for a 'filename'.
is nothing but a number found right after the last 'K' being found expanded to 3-digits
is the last 'K' found on it's own
both of these combined would for example if you an output in the form Kxxx no matter if the input was K1 K22 K555
gives you left part of something till within the last 'K' found, in other word everything apart from the numbers after the last 'K'
gives you same as above but without the 'K'
My advice is as following: create a bunch of columns within mp3tag and put each of the examples into their value fields, and see what get's displayed.