# REPLACE genre list by another genre list

**URL:** <https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580>\
**Category:** Support\
**Created:** [January 2, 2017, 4:52pm UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580 "2017-01-02T16:52:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![giacomo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/f17d59/32.png) [@giacomo](https://community.mp3tag.de/u/giacomo)\
**Post date:** [January 2, 2017, 4:52pm UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580/1 "2017-01-02T16:52:55Z")

</div>

I'm trying to convert the already tagged genre list (%genre% tag) into another genre list.  
To do so I've create a sequence of actions, one per each genre remapping.  
For instance:  
OLD NEW  
BLUES - CHICAGO Blues  
CLASSICAL - ORCHESTRAL Classic Music

I've tried many ways to do so but what I get is every single word is always matched and changed, so BLUES is replaced by Blues but CHICAGO remains and I get

Blues - CHICAGO instead of Blues

Is there any regexp that matches only and exactly word by word ? I'm attaching what I've done that is not exactly what I need.

[INDEPENDENT\_\_\_generi\_da\_\_genre\_.mta.txt](https://community.mp3tag.de/uploads/default/original/2X/a/a63df9c2e54df4138ccfb5779a2563dcd03da24e.txt) (22.4 KB)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [January 2, 2017, 7:14pm UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580/2 "2017-01-02T19:14:40Z")

</div>

> [@giacomo](#):
>
> I'm trying to convert the already tagged genre list (%genre% tag) into another genre list.  
> To do so I've create a sequence of actions, one per each genre remapping.  
> For instance:  
> OLD NEW  
> BLUES - CHICAGO Blues  
> CLASSICAL - ORCHESTRAL Classic Music
> 
> I've tried many ways to do so but what I get is every single word is always matched and changed, so BLUES is replaced by Blues but CHICAGO remains and I get
> 
> Blues - CHICAGO instead of Blues
> 
> Is there any regexp that matches only and exactly word by word ? I'm attaching what I've done that is not exactly what I need.

I see in your text file expressions like  
$regexp(%netradioowner%,(BLUES - CHICAGO BLUES),Blues)

I am simply puzzled.  
If you replace one string constant with another, a simple replace is enough.  
Also, if you use brackets in the search pattern, then this addresses a particular part which is referenced by $1 or $2 and so on.

You can test such an expression in the Convert\>Tag-Tag function.

But actually I would not use a $regexp at all.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [January 3, 2017, 11:59am UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580/3 "2017-01-03T11:59:04Z")

</div>

> [@ohrenkino](#):
>
> ...  
> But actually I would not use a $regexp at all.

I give you an example with the $replace() function instead of the $regexp():

$replace(My Blues Friend loves BLUES - CHICAGO,BLUES - CHICAGO,Bluesy)  
(2 times Blues and Bluesy are intended to show the outcome)

The first string "My Blues Friend loves BLUES - CHICAGO" may represent the contents of %netradioowner%.

The result of the $replace() function is:

"My Blues Friend loves Bluesy"

So the string in capitals has been replaced by "Bluesy", the rest stays as it is.

This is beyond my scope: I do not know how many actions you execute in this action group and I do not know if one action undoes the modification of a previous one.

---

<div class="post-metadata">

**Author:** ![giacomo](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/f17d59/32.png) [@giacomo](https://community.mp3tag.de/u/giacomo)\
**Post date:** [January 3, 2017, 12:11pm UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580/4 "2017-01-03T12:11:34Z")

</div>

> [@ohrenkino](#):
>
> I give you an example with the $replace() function instead of the $regexp():
> 
> $replace(My Blues Friend loves BLUES - CHICAGO,BLUES - CHICAGO,Bluesy)  
> (2 times Blues and Bluesy are intended to show the outcome)
> 
> The first string "My Blues Friend loves BLUES - CHICAGO" may represent the contents of %netradioowner%.
> 
> The result of the $replace() function is:
> 
> "My Blues Friend loves Bluesy"
> 
> So the string in capitals has been replaced by "Bluesy", the rest stays as it is.
> 
> This is beyond my scope: I do not know how many actions you execute in this action group and I do not know if one action undoes the modification of a previous one.

Thank you but I still have the issue that only some words are replaced and not the full string.  
I found a workaround, the replace works as expected only in case the I move the  
$replace(%netradioowner%,BLUES,Blues) to the bottom of all Blues-related replacements. This way, the more specific strings are replaced first, e.g.,  
$replace(%netradioowner%,BLUES - CHICAGO BLUES,Blues)  
and the more generic string only at the end.

🙂

---

<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:26pm UTC](https://community.mp3tag.de/t/replace-genre-list-by-another-genre-list/18580/5 "2026-02-09T12:26:35Z")

</div>


