REPLACE genre list by another genre list

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 (22.4 KB)

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.

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.

:slight_smile: