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

<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 26, 2015, 7:10am UTC](https://community.mp3tag.de/t/moving-part-of-title-to-genre/16859/20 "2015-06-26T07:10:02Z")

</div>

> [@zerow](#):
>
> ... So what you are saying is ...

Well, there is a problem within the regular expression, which has not be shown, when using numerical string values in the range from '01' to '99', but might coming up for strings like '101' .  
Other text strings like 'WATER' and 'WATERFALL' will show the same problem.  
There is no problem for 'WATER' and 'UNDERWATER'.

The failure was in the regular expression, which has evaluated the leading string fragment but not an entire word. Following example now evaluates a word for the comparing.

```auto
LIST_IN <== '111|101|01|WATER|WATERFALL|04|VILLAGE|06|UNDERWATER|03|02|10|11'

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

LIST_OUT <== $regexp(

               $regexp(
                $regexp(%LIST_SORT%,
                        $regexp(%LIST_SORT%,'(?>\b('%LIST_IN%')\b)',)
                        ,)
                ,'\|+','|')
               ,'\|$',)

LIST OUT = 01|02|03|04|06|10|11|101|111|UNDERWATER|VILLAGE|WATER|WATERFALL

```

DD.20150626.1123.CEST

---

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