# 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:** 25

<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:** [June 28, 2015, 3:18pm UTC](https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859/25 "2015-06-28T15:18:00Z")

</div>

> [@zerow](#):
>
> ... Can you provide me please with this additional code?

Do you want a process, which runs prior to the already known sort process?  
Hmm, the following expression should deliver all items, ...  
which are member of the input list, but not member of the basic list of sorted items.  
`$regexp(%LIST_IN%,'(?>\b('%LIST_SORT%')\b)',)`

DD.20150628.1918.CEST

Example:

The input list to work on ...  
`LIST_IN <== 'BAD1|111|101|01|09|WATER|WATERFALL|BAD2|04|VILLAGE|06|UNDERWATER|03|10|11|BAD3'`  
Note: The bad values are 'BAD1','BAD2','BAD3' ... and should be removed.

The basic sorted list of allowed items ...  
`LIST_SORT <== '01|02|03|04|05|06|07|08|09|10|11|101|111|UNDERWATER|VILLAGE|WATER|WATERFALL'`

Get all items from LIST\_IN, which are not member of LIST\_SORT ...  
`LIST_TMP1 <== $regexp($regexp($regexp(%LIST_IN%,'(?>\b('%LIST_SORT%')\b)',),'\|+','|'),'^\||\|$',)`

`LIST_TMP1 = BAD1|BAD2|BAD3`

Remove all items from LIST\_IN, which are member of LIST\_TMP1 ...  
`LIST_TMP2 <== $regexp($regexp($regexp(%LIST_IN%,'(?>\b('%LIST_TMP1%')\b)',),'\|+','|'),'^\||\|$',)`

`LIST_TMP2 = 111|101|01|09|WATER|WATERFALL|04|VILLAGE|06|UNDERWATER|03|10|11`

Get all items from LIST\_SORT, which are not member of LIST\_TMP2 ...  
`LIST_TMP3 <== $regexp($regexp($regexp(%LIST_SORT%,'(?>\b('%LIST_TMP2%')\b)',),'\|+','|'),'^\||\|$',)`

`LIST_TMP3 = 02|05|07|08`

Remove all items from LIST\_SORT, which are member of LIST\_TMP3, so get the sorted list output ...  
`LIST_OUT <== $regexp($regexp($regexp(%LIST_SORT%,'(?>\b('%LIST_TMP3%')\b)',),'\|+','|'),'^\||\|$',)`

`LIST_OUT = 01|03|04|06|09|10|11|101|111|UNDERWATER|VILLAGE|WATER|WATERFALL`

Remove tag-fields LIST\_TMP1, LIST\_TMP2, LIST\_TMP3, LIST\_SORT, LIST\_IN ...  
LIST\_TMP1 \<== $char(0)  
LIST\_TMP2 \<== $char(0)  
LIST\_TMP3 \<== $char(0)  
LIST\_SORT \<== $char(0)  
LIST\_IN \<== $char(0)  [Test2015\_20150701.zerow.sort.mta](https://community.mp3tag.de/uploads/default/original/2X/b/b2030319f3f08b2a1d4d424025274edd5c09e035.mta) (1.14 KB)  
DD.20150701.1006.CEST, DD.20150701.1532.CEST

[Test2015\_20150701.zerow.sort.mta](https://community.mp3tag.de/uploads/default/original/2X/b/b2030319f3f08b2a1d4d424025274edd5c09e035.mta) (1.14 KB)

---

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