# COPYRIGHT - eliminate redundancy

**URL:** https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494
**Category:** Support
**Created:** [July 8, 2023, 2:30pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494 "2023-07-08T14:30:49Z")
**Posts on this page:** 8
**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: [July 8, 2023, 2:30pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/1 "2023-07-08T14:30:49Z")

</div>

In the COPYRIGHT field I often find strings like

> **2023 Blues Route / Delta 2023 Blues Route / Delta**

The texts contain a different even number of words.  
I would like to eliminate the obvious redundancy in the text.  
After correction, I would like to get the following:

**\> 2023 Blues Route / Delta**

How to do 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: [July 8, 2023, 2:33pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/2 "2023-07-08T14:33:48Z")

</div>

See this thread which deals with the field GENRE.  
I am sure that you can adapt it to work with COPYRIGHT:

> [@Delete repeated genre's in the same exact field](https://community.mp3tag.de/t/delete-repeated-genres-in-the-same-exact-field/58954):
>
> I have looked everywhere for a solution, and have found nothing to pre-exist. All the other posts anywhere close to this either deal with multiple fields (I have just one field) named Genre, don't work, or removes everything after the first \\'s, and are several years old posts. I have ONE genre field (not multiple,) and want to cut out duplicates out of the same (not multiple) fields. I can cut it down to this so that every word is separated and ready for it to be applied; …

---

<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: [July 9, 2023, 11:33am UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/3 "2023-07-09T11:33:08Z")

</div>

Thank you for this hint.  
As I don't understand 🤔 the expression

`$regexp($reverse($regexp($regexp($reverse($regexp($regexp(%Genre%,'^(\s+;*|\s*;+)+|(\s+;*|\s*;+)+$|((?<=;)\s+)|(\s+(?=;))',),'^|,';')),'(;[^;]+)(?=(\1|;.*?\1))',),'^;+|;+,)),'(?<=;)',' ')`

in detail, I am not shure how to deal with this.  
--.--  
Another idea is to find the beginning of the redundant second part of the string and split COPYRIGHT in 2 values and delete the second one. But stil have to build an expression that scans the string ....

---

<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: [July 9, 2023, 1:46pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/4 "2023-07-09T13:46:22Z")

</div>

I would have thought that you replace every reference to %genre% with %copyright% and then try it in Convert\>Tag-Tag for COPYRIGHT.

---

<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: [July 9, 2023, 3:28pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/5 "2023-07-09T15:28:44Z")

</div>

There is no logical link between GENRE and COPYRIGHT.  
In COPYRIGHT you will often find  
a) the holder of the copyright  
b) the representative of the trademark  
I use COPYRIGHT and use it synonymously with the value of PUBLISHER.  
My goal here is to reduce or merge to one value.

---

<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: [July 9, 2023, 3:33pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/6 "2023-07-09T15:33:36Z")

</div>

The regular expression deals with the contents of GENRE as you can see in

> [@Roland](#):
>
> `...$regexp($regexp(%Genre%,'^(\s+;...`

To make that work with COPYRIGHT or if you like PUBLISHER, you have to replace `%genre%` with the fieldname that you want to treat, so it should become  
`...$regexp($regexp(%copyright%,'^(\s+;...`  
or  
`...$regexp($regexp(%publisher%,'^(\s+;...`  
or whatever field you want to treat.

---

<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: [July 10, 2023, 4:45pm UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/7 "2023-07-10T16:45:20Z")

</div>

Ok, I misunderstood your hint.  
I will try this and give feedback. 😉

January 2024: I am still working on this. 😬

---

<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 20, 2024, 7:48am UTC](https://community.mp3tag.de/t/copyright-eliminate-redundancy/61494/8 "2024-01-20T07:48:17Z")

</div>

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