# How to remove duplicated names within a tag

**URL:** https://community.mp3tag.de/t/how-to-remove-duplicated-names-within-a-tag/44450
**Category:** Support
**Created:** [February 7, 2019, 1:43am UTC](https://community.mp3tag.de/t/how-to-remove-duplicated-names-within-a-tag/44450 "2019-02-07T01:43:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![henriquebs12](https://community.mp3tag.de/user_avatar/community.mp3tag.de/henriquebs12/32/8205_2.png) [@henriquebs12](https://community.mp3tag.de/u/henriquebs12)
#### Post date: [February 7, 2019, 1:43am UTC](https://community.mp3tag.de/t/how-to-remove-duplicated-names-within-a-tag/44450/1 "2019-02-07T01:43:53Z")

</div>

Some of my songs have the ARTIST field like:

`Artist1, Artist1, Artist2, Artist3`

`Arist1, Artist2, Artist1, Artist3`

It is, duplicated artist names inside the tag Artist. What I'd like to do is create an action that can find igual strings between the comas, and remove them, allowing only one.

If it's impossible, it could be something like testing only the two first strings.

`%dummy1%, %dummy2, %dummy_the_rest%,`

And if %dummy1% = %dummy2%, then %dummy2% is replaced by an empty space (so it would be removed).

---

<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: [February 7, 2019, 6:07am UTC](https://community.mp3tag.de/t/how-to-remove-duplicated-names-within-a-tag/44450/2 "2019-02-07T06:07:19Z")

</div>

See this thread:

> [@Merging several Tag Fields into CONTENTGROUP](https://community.mp3tag.de/t/merging-several-tag-fields-into-contentgroup/10616/4):
>
> ... and here it goes ... Note: If we could sort a delimited itemlist within a tag-field, Mp3tag life would be much easier! If we could repeat one action in a loop, Mp3tag life would be much easier! Example itemlist: ITEMLIST="aaa,aaa,aaa,bbb,ccc,bbb,ddd,ddd,ddd,ccc,eee,fff,GGG,ggg,iii" The itemlist contains 15 items: "aaa" x 3, "bbb" x 2, "ccc" x 2, "ddd" x 3, "eee" x 1, "fff" x 1, "GGG" x 1, "ggg" x 1, "iii" x 1. This regular expression: $regexp(%ITEMLIST%,'(?:^|,)([^,]\*)(,\1)+(?=,|$)…

---

<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 7, 2021, 10:46am UTC](https://community.mp3tag.de/t/how-to-remove-duplicated-names-within-a-tag/44450/3 "2021-01-07T10:46:08Z")

</div>

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