# Regex to append to Genre

**URL:** https://community.mp3tag.de/t/regex-to-append-to-genre/12002
**Category:** Support
**Created:** [May 12, 2011, 12:23pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002 "2011-05-12T12:23:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![richhoward](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/c5a1d2/32.png) [@richhoward](https://community.mp3tag.de/u/richhoward)
#### Post date: [May 12, 2011, 12:23pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002/1 "2011-05-12T12:23:00Z")

</div>

I've recently been experimenting with using multiple genre tags, separated by semi colons. WMP reads each as a separate genre (allowing an album to sit in more than 1 at a time) and I'm finding it a helpful way to organise my music.

The problem comes when I want to add an extra genre to several different albums. For example, what if I want to add an 'instrumental' tag? I have albums from lots of different genres that may also be instrumental. In order to preserve each album's existing tags I'd need to go through them individually, adding ";instrumental" onto the end of the genre strings. This would be annoying at the best of times but I have 4,500 albums to get through!

So, would it be possible to dump all the tracks I wanted to add an additional genre to into mp3tag and use regex to append ";genrename" onto the end of the existing string?

Even better would be for it to check if it exists already and only add it if it is missing?

Can someone help? I've never been able to get my head around regex 😳

---

<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: [May 12, 2011, 1:35pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002/2 "2011-05-12T13:35:43Z")

</div>

> [@richhoward](#):
>
> ... adding ";instrumental" onto the end of the genre strings.

You have the honour to get my 1000th post in this forum.

Have a look at the FAQs:  
[/t/967/1](https://community.mp3tag.de/t/967/1)  
in your case select genre and set it to  
%genre%; new classification

To filter only those which do not have a semicolon in the genre set the following filter:  
NOT %genre% HAS ;

---

<div class="post-metadata">

### Author: ![richhoward](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/c5a1d2/32.png) [@richhoward](https://community.mp3tag.de/u/richhoward)
#### Post date: [May 12, 2011, 3:20pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002/3 "2011-05-12T15:20:13Z")

</div>

That's fantastic - you're a star!

I don't suppose it's possible to integrate the filter into the action is it?

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [May 12, 2011, 5:17pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002/4 "2011-05-12T17:17:11Z")

</div>

> [@richhoward](#):
>
> So, would it be possible to dump all the tracks I wanted to add an additional genre to into mp3tag

Explain what you mean by "dump"? I don't know of any way unless there's already some criteria contained in the metadata or file path that you can use as a filter. Which doesn't sound like it's the case.

> [@](#):
>
> and use regex to append ";genrename" onto the end of the existing string?

It doesn't require a regex to append a string onto the end of a field.

_Action type:_ **Format value**  
_Field:_ **GENRE**  
_Format string:_ **%genre%;Instrumental**

> [@](#):
>
> Even better would be for it to check if it exists already and only add it if it is missing?

That doesn't require a regex either. You could filter the tracks within Mp3tag using:

NOT %genre% HAS "instrumental"

---

<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:23pm UTC](https://community.mp3tag.de/t/regex-to-append-to-genre/12002/5 "2026-02-09T12:23:06Z")

</div>


