Replace multiple genres with one

I’m trying to create an action to replace several meesed genres into one. Can you please suggest what regex I should use for %genre% to capture anything there?

So far my attempts resulted in replacing every single char with the new genre name (GENREGENREGENRE…)

Please show us some real current content from your GENRE and the expected result.

You can create screenshots or copy & paste the current content from your GENRE in your next answer.

There are multiple hip-hop related genders which I want to unify under “Hip-Hop”. Currently I havee Hiphop, Rap, Rap/Hip-Hop, HH etc.

You want to replace all the existing GENRE in every song that includes one or more of these genres

Hiphop
Rap
Rap/Hip-Hop
HH

with only one GENRE
Hip-Hop
?

Precisely, that’s my desire!

I don't see yet how to solve it with an Action.

But with Convert Tag -> Tag you could solve it with this Formatstring:
$dedup($regexp(%GENRE%,\b(?:Hiphop|Rap|Rap/Hip-Hop|HH)\b,Hip-Hop),/,1)
you can adjust the list of GENRE divided by a Pipe | as you need.


would result in 5 x Hip-Hop and 1 x unchanged Pop GENRE content.

The deduplication only works, if multiple GENREs are divided with a Slash / (without Spaces) like in Rap/Hip-Hop

Sounds wonderful, thank you a million!

For future readers:

Just to be clear, in the unlikely case that your GENRE content were to be something like
Metal/Rap/Salsa/Soul/HH
your GENRE would be replaced with the above Formatstring to
Metal/Hip-Hop/Salsa/Soul
because Rap and HH would be found, replaced and deduplicated.