# Splitting multiple entries in a Tag value

**URL:** https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005
**Category:** Support
**Created:** [July 5, 2008, 12:03pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005 "2008-07-05T12:03:45Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [July 5, 2008, 12:03pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/1 "2008-07-05T12:03:45Z")

</div>

Some of my FLAC tags have multiple entries in a single Tag field e.g. the Genre entry may contain "Rock, Classic Rock, Hard Rock". Entries are always separated by a comma or other delimiter ';'.

Whilst I would like to maintain each of the entries within the Gentre tag, it seems a preferred approach is to create multiple Genre tags, each with a discrete entry, whereby the abovementioned example would result in three Genre tags for the track in question, the first being "Rock", the second being "Classic Rock" and the third being "Hard Rock".

So my question is, is there a way to traverse a series of tracks and parse the existing Genre tags, searching for a "," or a ";" and if found, to parse the string and create an additional Genre tag for each entry, and then finally changing the first Genre tag to remove the additional entries?

---

<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: [July 5, 2008, 4:18pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/2 "2008-07-05T16:18:29Z")

</div>

> [@egd](#):
>
> ... So my question is, is there a way to traverse a series of tracks and parse the existing Genre tags, searching for a "," or a ";" and if found, to parse the string and create an additional Genre tag for each entry, and then finally changing the first Genre tag to remove the additional entries?

Example:

From  
GENRE: **Rock,Jazz;Beat,**

To  
GENRE: **Rock**  
GENRE: **Jazz**  
GENRE: **Beat**

By steps:

1. 

Run actionsgroup:

Begin Actionsgroup **TEST\_egd**

Action #1  
_Actiontype 5:_ **Format tag field**  
_Field:_ **GENRE**  
_Formatstring:_ **$regexp(%genre%,','|;,\\)**  
or  
_Formatstring:_ **$regexp(%genre%,',|;','\\')**  
or  
_Formatstring:_ **$regexp(%genre%,'\s\*[,;]\s\*','\\')** (respects spaces around delimiters)

End Actionsgroup **TEST\_egd** (1 Action)

1. 

Afterwards press [Ctrl+S] or use menu dialog to save tag.

DD.20080705.2018.CEST

---

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [July 18, 2008, 9:00pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/3 "2008-07-18T21:00:36Z")

</div>

Thanks for the abovementioned regex, which writes out GENRE=gentre1\\genre2 etc.

Is this how mp3tag always deals with multiple entries in a tag, as I understand that the "standard" dictates that the preferred method is to create multiple Vorbis tags rather than use a delimiter?

Would it be possible to write the multiple entries rather than create a \\ delimited string, which is in effect much the same as my approach of using a ';' or a ',' ?

---

<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: [July 19, 2008, 6:19am UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/4 "2008-07-19T06:19:15Z")

</div>

> [@egd](#):
>
> Thanks for the abovementioned regex, which writes out GENRE=gentre1\\genre2 etc. ...

If you respect point "2. Afterwards press [Ctrl+S] or use menu dialog to save tag.", then Mp3tag will create a single tag field for each genre item in mp3 file.  
I do not know if this procedure works with other music file types too e. g. wma.

DD.20080719.1019.CEST

---

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [September 9, 2008, 6:35pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/5 "2008-09-09T18:35:50Z")

</div>

Works like a charm, thank you 🙂

One thing to note - the point 2 part only works so long as the TAG entries for the selected tracks whose specific tags you're wanting to work on are identical, so the best thing to do is sort by tag value and then apply point 2.

---

<div class="post-metadata">

### Author: ![Tchuvak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@Tchuvak](https://community.mp3tag.de/u/Tchuvak)
#### Post date: [December 18, 2008, 5:11pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/6 "2008-12-18T17:11:48Z")

</div>

Hi,

I tried the split action (split fields by seperator) on some of my mp3s (they were all tagged the same way for the genres: Hip-Hop, Reggae, Russian)

After the action, I pressed Ctrl+S and my mp3s were successfully tagged Hip-Hop\\Reggae\\Russian.

Unfortunately, it seems that mp3tag only takes the first tag, i.e. Hip-Hop, and ignores "Reggae" and "Russian"

What am I doing wrong? ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")

Thanks

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 18, 2008, 6:29pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/7 "2008-12-18T18:29:10Z")

</div>

You can use something like $meta(genre) or $meta\_sep(genre,-) to retrieve all instances of a given field.

Kind regards,  
Florian

---

<div class="post-metadata">

### Author: ![Tchuvak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@Tchuvak](https://community.mp3tag.de/u/Tchuvak)
#### Post date: [December 19, 2008, 6:39am UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/8 "2008-12-19T06:39:41Z")

</div>

> [@Florian](#):
>
> You can use something like $meta(genre) or $meta\_sep(genre,-) to retrieve all instances of a given field.

Hum... you lost me... 😳

What can I do to turn  
genre=Hip-Hop\\Reggae\\Russian

into

genre1=Hip-Hop  
genre2=Reggae  
genre3=Russian  
?

Now, mp3tag takes only genre=Hip-Hop so the other genres are ignored by it, and therefore my mp3 player (samsung P2).

thanks in advance

---

<div class="post-metadata">

### Author: ![TechUser](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/c0e974/32.png) [@TechUser](https://community.mp3tag.de/u/TechUser)
#### Post date: [January 19, 2009, 8:31am UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/9 "2009-01-19T08:31:44Z")

</div>

The tag editor feature seems buggy when working with artist fields that have multiple values. When I try to set multiple artists on wma lossless files, either by using the "\\" trick or by adding an ARTIST field multiple times in extended tag editor, I get duplicate values and other problems. (For instance: Brahms\\CSO\\Perlman\\CSO\\Brahms). I've tried various ways to correct it, but none of the corrections "take." Possibly it was not designed to edit tags that have multiple values.  
--I can edit these values successfully using the wmp 11 built-in tag editor, but perhaps this is not well documented for wma files.

---

<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:21pm UTC](https://community.mp3tag.de/t/splitting-multiple-entries-in-a-tag-value/7005/10 "2026-02-09T12:21:02Z")

</div>


