# Double Artist Removal

**URL:** https://community.mp3tag.de/t/double-artist-removal/12604
**Category:** Support
**Created:** [October 17, 2011, 5:28pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604 "2011-10-17T17:28:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![snowboarder\_1603](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snowboarder\_1603](https://community.mp3tag.de/u/snowboarder_1603)
#### Post date: [October 17, 2011, 5:28pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/1 "2011-10-17T17:28:55Z")

</div>

Not that great at mp3 tag. I have a lot of files that are formated as such %artist%/%artist% and would like them to be only %artist%

E.g.  
Chicago/Chicago  
changed to  
Chicago

How would i do this? Thanks

---

<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: [October 17, 2011, 5:39pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/2 "2011-10-17T17:39:01Z")

</div>

Have a look at the actions.  
Ther is one that removes duplicate fields.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 17, 2011, 5:47pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/3 "2011-10-17T17:47:02Z")

</div>

> [@ohrenkino](#):
>
> Have a look at the actions.  
> Ther is one that removes duplicate fields.

the "remove duplicate fields" removes multivalue tags. they have to be separated by `\\` and it doesn't matter if they actually have the same value.

for  
Chicago/Chicago  
to  
Chicago  
i would use:

Action: Format Value  
Field: `%artist%`  
Formatstring: `$regexp(%artist%,(.+)/.+,$1)`

that removes everything from the frist "/" to the end.

or, maybe easier because without regular expressions:

Action: Guess Values  
Sourceformat: `%artist%`  
Guessing pattern: `%artist%/%dummy%`

---

<div class="post-metadata">

### Author: ![snowboarder\_1603](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snowboarder\_1603](https://community.mp3tag.de/u/snowboarder_1603)
#### Post date: [October 17, 2011, 6:03pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/4 "2011-10-17T18:03:45Z")

</div>

Tried both of your strings and they do infact remove everything after / but some artist are written like this t-pain/jay-z/50 cent and i want to keep those ones. How do i make it for exactly the same before and after /?

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 17, 2011, 6:05pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/5 "2011-10-17T18:05:03Z")

</div>

or even better (and more complicated)

Action: Format Value  
Field: ARTIST  
Formatstring: `$if($eql($regexp(%artist%,^(.+)/(.+)$,$1),$regexp(%artist%,^(.+)/(.+)$,$2)),$regexp(%artist%,^(.+)/(.+)$,$1),%artist%)`

That only removes what comes after "/" if it is exactly the same as befor the "/"

So:  
Chicago/Chicago to Chicago  
but  
AC/DC stays AC/DC

by this, you can use this for a mass renaming without checking every file for it's content.

---

<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: [October 18, 2011, 7:45am UTC](https://community.mp3tag.de/t/double-artist-removal/12604/6 "2011-10-18T07:45:11Z")

</div>

> [@pone](#):
>
> ...but  
> AC/DC stays AC/DC

@pone: you are right of course in repect to mp3tag that you would need a double backslash.  
In WMP, though, the slash is interpreted as separator and you will get a group AC and one called DC.  
So my advice would be to eliminate all slashs completely and replace them with similar looking character but one with a completely different one like ⁄ (U+2044).  
Does not help a lot with the basic problem but should dampen any enthusiasm.

---

<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: [October 18, 2011, 10:12am UTC](https://community.mp3tag.de/t/double-artist-removal/12604/7 "2011-10-18T10:12:41Z")

</div>

> [@snowboarder\_1603](#):
>
> ... I have a lot of files that are formated as such %artist%/%artist% and would like them to be only %artist%  
> E.g.  
> Chicago/Chicago  
> changed to  
> Chicago  
> How would i do this? Thanks

Apply the filter expression:

**ARTIST MATCHES "(.+?)/\1"**

This should display only those files having ARTIST content like 'Chicago/Chicago'.

To change an ARTIST content like 'Chicago/Chicago' to 'Chicago' apply an action:  
Action: Format value  
Field: ARTIST  
Formatstring: **$regexp(%ARTIST%,'(.+?)/\1','$1')**

DD.20111018.1414.CEST

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 18, 2011, 3:39pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/8 "2011-10-18T15:39:13Z")

</div>

> [@DetlevD](#):
>
> **ARTIST MATCHES "(.+?)/\1"**
> 
> ...
> 
> **$regexp(%ARTIST%,'(.+?)/\1','$1')**

thanks Detlev, a good one to know. i alread stumbled about the \1 somewhere, but I thought it's the same as $1 . now i see the difference.

---

<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: [January 6, 2021, 5:50pm UTC](https://community.mp3tag.de/t/double-artist-removal/12604/9 "2021-01-06T17:50:58Z")

</div>

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