# Replacing genre name while using double backslash separators

**URL:** <https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548>\
**Category:** Support\
**Created:** [March 31, 2023, 10:50am UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548 "2023-03-31T10:50:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![melonguru](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@melonguru](https://community.mp3tag.de/u/melonguru)\
**Post date:** [March 31, 2023, 10:50am UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/1 "2023-03-31T10:50:15Z")

</div>

I use MusicBee to organize my music library, and the nice thing is that it allows for multiple genres. When I store multiple genre tags on one album, it'll show this in Mp3tag with as follows:

`Genre 1\\Genre 2\\Genre 3\\etc`

Now I decided that I wanted to change all music I have tagged as "Melodeath" to have its genre tag changed to "Melodic Death Metal". However in every batch way I try to do this, it gets rid of all the other genre tags as well. So far I tried the function

$replace(%genre%,Melodeath,Melodic Death Metal)

but that doesn't work. I learned that Mp3tag treats the double backslash as a tag separator, so it creates multiple genre tags in the file. Is there a way I can circumvent this while replacing in batch?

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [March 31, 2023, 12:02pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/2 "2023-03-31T12:02:04Z")

</div>

I think you have to create an action group with 3 actions, that are executed subsequently in one go.

1. Action "Merge duplicate fields"
2. Action "Replace" your unwanted genre-string
3. Action "Split by field separator" to separate them again

---

<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:** [March 31, 2023, 3:26pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/3 "2023-03-31T15:26:28Z")

</div>

> [@melonguru](#):
>
> $replace(%genre%,Melodeath,Melodic Death Metal)

You could try:  
`$replace($meta_sep(genre,\\),Melodeath,Melodic Death Metal)`

---

<div class="post-metadata">

**Author:** ![melonguru](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@melonguru](https://community.mp3tag.de/u/melonguru)\
**Post date:** [March 31, 2023, 5:28pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/4 "2023-03-31T17:28:03Z")

</div>

How do I merge duplicate fields?

---

<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:** [March 31, 2023, 5:30pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/5 "2023-03-31T17:30:40Z")

</div>

See here:

> **[Merge Duplicate Fields – Mp3tag Documentation](https://docs.mp3tag.de/actions/merge-duplicate-fields/)**
>
> Documentation on the Merge Duplicate Fields action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

**Author:** ![melonguru](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/b5ac83/32.png) [@melonguru](https://community.mp3tag.de/u/melonguru)\
**Post date:** [March 31, 2023, 5:31pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/6 "2023-03-31T17:31:50Z")

</div>

> [@ohrenkino](#):
>
> `$replace($meta_sep(genre,\\),Melodeath,Melodic Death Metal)`

This works! However it does give an extra space before the entire field?

---

<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:** [March 31, 2023, 5:33pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/7 "2023-03-31T17:33:04Z")

</div>

The scripting command itself does not do that. So please check your configuration.

---

<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:** [April 30, 2023, 5:33pm UTC](https://community.mp3tag.de/t/replacing-genre-name-while-using-double-backslash-separators/60548/8 "2023-04-30T17:33:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
