# How to eliminate double entry in a field?

**URL:** https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027
**Category:** General Discussion
**Created:** [March 3, 2010, 8:02pm UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027 "2010-03-03T20:02:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 3, 2010, 8:02pm UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/1 "2010-03-03T20:02:12Z")

</div>

sometimes i get records with double entry in some fields. for example in the artist field it may be like this....jackson//jackson

i select the records and press alt T. and edit the tag items by deleting the extra entries. if i select multiple records nothing is being done. i have to select records one by one and make the editing. so if i have double entry in five records i have to do it five times. is it possible to select more than one records and make the editing by pressing ALT T ?

---

<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: [March 3, 2010, 8:10pm UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/2 "2010-03-03T20:10:51Z")

</div>

You can remove the field and set it to the desired value (e.g., Jackson).

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 8, 2010, 9:11am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/4 "2010-03-08T09:11:50Z")

</div>

> [@Florian](#):
>
> You can remove the field and set it to the desired value (e.g., Jackson).

but the suggestion is applicable if i have a particular album of a particular artist. if i have an album which contains various artists, and i do have the artist name twice as in my first post, how is it possible to delete and enter the new one for all artists? in that case i have to take each record seperately and to edit the field. by presssing ALT+T i can edit the entries of a single record. i f i select multiple records mp3tag doesn't do anything. i want help on this issue. thanks and have a nice day.

---

<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: [March 8, 2010, 10:19am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/5 "2010-03-08T10:19:24Z")

</div>

> [@evergreen1](#):
>
> ... i do have the artist name twice as in my first post, how is it possible to delete and enter the new one for all artists? ...

Given is a tag field ARTIST with content "Artist##Artist". You want to have the content to be "Artist".

You can apply an action "Format value" using the $regexp() function or an action "Replace using Regular Expression".

_Actiontype 5:_ **Format tag field**  
_Field:_ **ARTIST**  
_Formatstring:_ **`$regexp(%ARTIST%,'^(.+?)##\1$','$1')`**

From: **Artist##Artist**  
To: **Artist**

The exercise how to modify this example to use it with other separator characters is left to you.

DD.20100308.1220.CET

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 11, 2010, 10:42am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/6 "2010-03-11T10:42:27Z")

</div>

> [@DetlevD](#):
>
> Given is a tag field ARTIST with content "Artist##Artist". You want to have the content to be "Artist".
> 
> You can apply an action "Format value" using the $regexp() function or an action "Replace using Regular Expression".
> 
> _Actiontype 5:_ **Format tag field**  
> _Field:_ **ARTIST**  
> _Formatstring:_ **$regexp(%ARTIST%,'^(.+?)##\1$','$1')**
> 
> From: **Artist##Artist**  
> To: **Artist**
> 
> The exercise how to modify this example to use it with other separator characters is left to you.
> 
> DD.20100308.1220.CET

unfortunately it doesn;t work.  
i have artist\\artist.  
i applied as per instructions-format value  
field aritst  
format string as-------\>$regexp(%ARTIST%,'^(.+?)\\ \\1$','$1')  
nothing is done!

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [March 11, 2010, 11:14am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/7 "2010-03-11T11:14:00Z")

</div>

There's an action "Remove duplicate fields"

Or change the string from DetlevD to  
`$regexp($meta_sep(ARTIST,##),'^(.+?)##\1$','$1')`

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 12, 2010, 3:25am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/8 "2010-03-12T03:25:09Z")

</div>

dear dano,

sorry to say that the regexp doesn't work. my seperator is slash.(artist\\artist title\\title etc) i replaced it and tried but the result was in the negative. since my seperator is backslash and there is a backslash in regexp itself. so there will be five backslashes and i doubt whether prog will recognise them properly. i tried with a space between two backslashes but find no improvement.

but to my pleasure the first option (remove dup fields)suggested by dano does work.

---

<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: [March 12, 2010, 10:01am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/9 "2010-03-12T10:01:33Z")

</div>

> [@evergreen1](#):
>
> ... my seperator is forwardslash.(artist\\artist title\\title etc) ...

Try to learn how to differentiate between "forward slash" and "back slash" and how to use those characters as separators in Mp3tag.

German:  
[http://de.wikipedia.org/w/index.php?title=...;oldid=69929904](http://de.wikipedia.org/w/index.php?title=Schr%C3%A4gstrich&oldid=69929904)  
[http://de.wikipedia.org/w/index.php?title=...;oldid=71439789](http://de.wikipedia.org/w/index.php?title=Umgekehrter_Schr%C3%A4gstrich&oldid=71439789)

English:  
[http://en.wikipedia.org/w/index.php?title=...oldid=349319073](http://en.wikipedia.org/w/index.php?title=Slash_(punctuation)&oldid=349319073)  
[http://en.wikipedia.org/w/index.php?title=...oldid=349020884](http://en.wikipedia.org/w/index.php?title=Backslash&oldid=349020884)

DD.20100312.1201.CET

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [March 12, 2010, 8:53pm UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/10 "2010-03-12T20:53:16Z")

</div>

thanks to point out my mistake. i have backslash as seperator.

---

<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:44am UTC](https://community.mp3tag.de/t/how-to-eliminate-double-entry-in-a-field/10027/11 "2021-01-07T10:44:08Z")

</div>

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