# Reversing Genre Order

**URL:** https://community.mp3tag.de/t/reversing-genre-order/11480
**Category:** Support
**Created:** [January 21, 2011, 6:56pm UTC](https://community.mp3tag.de/t/reversing-genre-order/11480 "2011-01-21T18:56:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![helpless](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/7ba0ec/32.png) [@helpless](https://community.mp3tag.de/u/helpless)
#### Post date: [January 21, 2011, 6:56pm UTC](https://community.mp3tag.de/t/reversing-genre-order/11480/1 "2011-01-21T18:56:42Z")

</div>

I've made a mistake with my tagging of 10 000 plus tracks using multiple genre tags in that I've put them in the form of

example Jazz\\Alternative\\Indie with Jazz being the main genre

sometimes I've just used one genre, other time 2,3,4 + sub-genres.

What I didn't realize is that my sonos system that reads the FLAC's only catalogues by the last tag, in the above case Indie.

Is there a way of reversing all genre entries

e.g Indie\\Alternative\\Jazz

irrespective of how many tags (sub genre entries) I've used

Here's fingers crossed for a solution ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:")

Regards helpless

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 21, 2011, 8:51pm UTC](https://community.mp3tag.de/t/reversing-genre-order/11480/2 "2011-01-21T20:51:13Z")

</div>

> [@helpless](#):
>
> ... Is there a way of reversing all genre entries  
> e.g Indie\\Alternative\\Jazz  
> irrespective of how many tags (sub genre entries) ...

Hmm, ... if Mp3tag would support it's own functions in the "Replace" part of it's regexp() function, then it would be something like this ...

**$trim($regexp('\'$reverse($meta\_sep(GENRE,'\\\\'))'\','\\\\(.+?)\\\\',$reverse($1)'\\\\'),'\')** 

... but sadly it isn't so.

 

DD.20100121.2252.CET

 

Edit.  
The following Mp3tag scripting expression can be used to move the trailing value to become the leading value in a multi-value tag-field, i. e. moving from last position to first position.

 

Action "Format value" or Converter "Tag - Tag"  
Field: GENRE  
Format string:

 **$regexp($meta\_sep(GENRE,'\\\\'),'^(.+)\\\\(.+)$','$2\\\\$1')** 

DD.20120417.1222.CEST

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [January 22, 2011, 1:49pm UTC](https://community.mp3tag.de/t/reversing-genre-order/11480/3 "2011-01-22T13:49:17Z")

</div>

Action: Format Value  
Field: GENRE  
Formatstring: $meta(genre,9)\\$meta(genre,8)\\$meta(genre,7)\\$meta(genre,6)\\$meta(genre,5)\\$meta(genre,4)\\$meta(genre,3)\\$meta(genre,2)\\$meta(genre,1)\\$meta(genre,0)

This is for a maximum of 10 genres, if you have more just add them at the begin of the formatstring.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:22pm UTC](https://community.mp3tag.de/t/reversing-genre-order/11480/4 "2026-02-09T12:22:51Z")

</div>


