# Normalize duplicate text

**URL:** <https://community.mp3tag.de/t/normalize-duplicate-text/55187>\
**Category:** Support\
**Created:** [November 22, 2021, 7:45am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187 "2021-11-22T07:45:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)\
**Post date:** [November 22, 2021, 7:45am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/1 "2021-11-22T07:45:38Z")

</div>

In a field (e.g. PUBLISHER) I often find information that is stored there two times.  
For example "2021 The Numero Group 2021 The Numero Group".  
How can I remove the redundancy from these strings?

---

<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:** [November 22, 2021, 7:50am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/2 "2021-11-22T07:50:01Z")

</div>

Is it really the string

> [@Roland](#):
>
> 2021 The Numero Group 2021 The Numero Group

or does it look like  
`2021 The Numero Group\\2021 The Numero Group`

---

<div class="post-metadata">

**Author:** ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)\
**Post date:** [November 22, 2021, 7:51am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/3 "2021-11-22T07:51:21Z")

</div>

It's really the string as postet, no delimiter in this.

---

<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:** [November 22, 2021, 8:02am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/4 "2021-11-22T08:02:39Z")

</div>

> [@Roland](#):
>
> 2021 The Numero Group 2021 The Numero Group

If the separator is the number, then this would work:  
`$regexp('2021 The Numero Group 2021 The Numero Group',(.*) (\d+.*),$1)`

---

<div class="post-metadata">

**Author:** ![Roland](https://community.mp3tag.de/user_avatar/community.mp3tag.de/roland/32/8001_2.png) [@Roland](https://community.mp3tag.de/u/Roland)\
**Post date:** [November 22, 2021, 8:23am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/5 "2021-11-22T08:23:46Z")

</div>

Thank you, good idea to solve this issue. 🤗  
But how to handle  
"(C) 2013 AP Music Ltd (P) 2013 AP Music Ltd"

---

<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:** [November 22, 2021, 8:27am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/6 "2021-11-22T08:27:32Z")

</div>

According to my test  
`$regexp('(C) 2013 AP Music Ltd (P) 2013 AP Music Ltd',(.*) (\d+ .*),$1)`  
leads to  
"(C) 2013 AP Music Ltd (P)"  
and as (C) and (P) are not really duplicates ...

TBH: in this case you do not have the number as separator but a single letter in brackets. So use that.

---

<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:** [December 22, 2021, 8:28am UTC](https://community.mp3tag.de/t/normalize-duplicate-text/55187/7 "2021-12-22T08:28:19Z")

</div>

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