Alphebetizing Genre Tag. Possible?

Hi Guys,
I am trying to sort my music collection by Genre.
In My mp3's, I use multiple words in a single line genre tag to describe my tracks.
say for example, I have a fast track that is in a breakbeat style, but is a remix of a hip-hop song.
The genre I would use would be like this: Breakbeat Hip-Hop Uptempo
My question is, is it possible to create an action which would ensure the words in the genre tag are in alphabetical order?
So that if i had tagged the aforementioned song as: Uptempo Breakbeat Hip-Hop, it would rearrange the words to read Breakbeat Hip-Hop Uptempo?
Thanks for any help you guys can give me.

Regards,
Lil Vito

Short answer to the question is "no".
The Mp3tag Scripting Language does not support an item list oriented sorting function.

But ... if there are not so much items, then there might be a possibility to create a complex if-then-else construction.
For two items it would be something like the following example.

Example:
Tag field GENRE carries two items "Hip-Hop Breakbeat".
Obviously "Breakbeat" should be the first item because of the alphabetical or lexical sort order.
Tag field GENRE should become "Breakbeat Hip-Hop".

So we can define a rule: 
If item1 is greater than item2, then swap both items, otherwise do nothing.

How to get item1:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$1')

How to get item2:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2')

How to swap item1 and item2:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2 $1')

The rule can be written in Mp3tag Scripting Language:
$if($grtr($regexp(%GENRE%,'^(.+?)\s(.+?)$','$1'),$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2')),$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2 $1'),%GENRE%)

Now someone might be able to construct a more complicated if-then-else case structure, which can handle more than two items, by using the basics as given in the above example.

DD.20100530.1745.CEST

QUOTE (DetlevD @ May 31 2010, 01:45) <{POST_SNAPBACK}>
Short answer to the question is "no".

The Mp3tag Scripting Language does not support an item list oriented sorting function.

But ... if there are not so much items, then there might be a possibility to create a complex if-then-else construction.
For two items it would be something like the following example.

Example:
Tag field GENRE carries two items "Hip-Hop Breakbeat".
Obviously "Breakbeat" should be the first item because of the alphabetical or lexical sort order.
Tag field GENRE should become "Breakbeat Hip-Hop".

So we can define a rule: 
If item1 is greater than item2, then swap both items, otherwise do nothing.

How to get item1:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$1')

How to get item2:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2')

How to swap item1 and item2:
$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2 $1')

The rule can be written in Mp3tag Scripting Language:
$if($grtr($regexp(%GENRE%,'^(.+?)\s(.+?)$','$1'),$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2')),$regexp(%GENRE%,'^(.+?)\s(.+?)$','$2 $1'),%GENRE%)

Now someone might be able to construct a more complicated if-then-else case structure, which can handle more than two items, by using the basics as given in the above example.

DD.20100530.1745.CEST

Thanks heaps DetlevD.
I'm quite capable of expanding on that.
This is just the answer I needed :slight_smile:
I will post once I have a working script.

PS. is there any reference on the mp3tag scripting language?
I have looked all through the help, but can't find anything more than a very basic list of a few commands. (nothing on syntax etc.)