# Moving part of TITLE to GENRE

**URL:** <https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859>\
**Category:** Support\
**Created:** [April 27, 2015, 6:50pm UTC](https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859 "2015-04-27T18:50:27Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [July 2, 2015, 2:41pm UTC](https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859/30 "2015-07-02T14:41:27Z")

</div>

> [@DetlevD](#):
>
> See new example there ...  
> [Moving part of TITLE to GENRE](https://community.mp3tag.de/t/16859/25)
> 
> DD.20150701.1534.CEST

I am that stupid or this just gives out me every time

```
01|02|03|04|05|06|07|08|09|10|11|101|111|UNDERWATER|VILLAGE|WATER|WATERFALL'

```

in the LIST\_OUT, no matter what value was in the LIST\_IN

But I've also came up with [a workaround solution](http://sendfile.pl/pokaz/413415---T6lg.html), without creating so many additional tag fields:

```
1]
Replace "GENRE": " " -> "##"

2]
Replace "GENRE": "####" -> |

3]
Replace "GENRE": "##" -> |

4]
Replace "GENRE": " " -> ""

5]
Replace "GENRE": "\+|" -> "|"

6]
Replace "GENRE": "|ACTION" -> "|11"
[...]
Replace "GENRE": "|TRIBAL" -> "|38"
Replace "GENRE": "|UNDERWATER" -> "|39"
Replace "GENRE": "|VILLAGE" -> "|41"
Replace "GENRE": "|WASTELAND" -> "|42"
Replace "GENRE": "|WATER" -> "|43"

7]
Replace "GENRE": "|" -> "|0"

8]
Guess values %GENRE%: |%GENRE%

9]
Format value "GENRE_ORDER": '000|001|002|003|004|005|006|007|008|009|010|011|012|013|014|015|016|017|018|
019|020|021|022|023|024|025|026|027|028|029|030|031|032|033|034|035|036|037|038|
0
39|040|041|042|043|044|045|046|047|048|049|050|051|052|053|054|055|056|057|058|0
5
9|060|061|062|063|064|065|066|067|068|069|070|071|072|073|074|075|076|077|078|07
9
|080|081|082|083|084|085|086|087|088|089|090|091|092|093|094|095|096|097|098|099
|
09X'

10]
Format value "GENRE": $regexp($regexp($regexp(%GENRE_ORDER%,$regexp(%GENRE_ORDER%,'(?>\b('%GENRE%')\b)',),),'\|+','|'),'\|$',)

11]
Replace "GENRE": "011" -> "ACTION"
[...]
Replace "GENRE": "038" -> ""TRIBAL"
Replace "GENRE": "039" -> "UNDERWATER"
Replace "GENRE": "041" -> "VILLAGE"
Replace "GENRE": "042" -> "WASTELAND"
Replace "GENRE": "043" -> "WATER"

12]
Replace "GENRE": "|" -> " ##"

13]
Format value "GENRE": $trim(%GENRE%)

14]
Format value "GENRE": ##%GENRE%

15]
Replace "GENRE": "##0" -> "##"

16]
Replace "GENRE": "##" -> "" (only as a whole word)

17]
Replace "GENRE": "####" -> "##"

18]
Format value "GENRE_ORDER": $char(0)

```

At first I seemed that all I had to do with my previous version [while having already the data in aforementioned format "##00 ##00 ##ABCABCABC ##00", with the addition of possible errors like "##SOMETHING-NOT-ON-THE-LIST ABCABCABC"] was to just add at the beginning a simple

```
Replace "GENRE": " " -> "##
"Replace "GENRE": "####" -> "|"

```

and eventually change code words to code numbers- but then of course in further testing the WATER came at me with its full power

But now this whole process works even better than I intended; because:  
A] If I have a semi-correct "WATER" [without the marker], during the whole process it will automatically become fully correct "##WATER" [with the marker]  
B] There is no more UNDERWATER / WATER / WATERFALL issue [by the way; thank you for directing my attention to WATERFALL variation of this glitch]  
C] It will be easier to apply changes to temporary digit codes and much more error proof [that why I used a separate entry for every word-to-number / number-to-word replacement, instead of $replace command with a long list

Plus aside from that one main crucial line, all of those actions are readable for me and not just some bunch of %(|'$,WTF?). And that will come in handy in the future if I decide to make some big change and will have to adjust. And of course the minus is having not only a GENRE\_ORDER / LIST\_SORT but also kind of manually repeating it two times

[And when I was designing this system I wanted to use only numbers. But as I've processed 20% of my files, I can see now that without this word descriptions I would not be so efficient in categorizing music for RPG purposes. For example I use "ACTION" as code for ACTION / CHASE / FIGHT, which further explains what kind of music should be in this group]

---

_[View the full topic](https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859)._
