# Condensing redundant text

**URL:** <https://community.mp3tag.de/t/condensing-redundant-text/58205>\
**Category:** Support\
**Created:** [August 14, 2022, 10:44pm UTC](https://community.mp3tag.de/t/condensing-redundant-text/58205 "2022-08-14T22:44:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abijahmaniaco](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@abijahmaniaco](https://community.mp3tag.de/u/abijahmaniaco)\
**Post date:** [August 14, 2022, 10:44pm UTC](https://community.mp3tag.de/t/condensing-redundant-text/58205/1 "2022-08-14T22:44:49Z")

</div>

This seems like a simple task, but I haven’t been able to find a solution. In the following example, there is redundant text (“2000 Universal Music (Denmark) A/S” appears twice):

℗ 2000 Universal Music (Denmark) A/S © 2000 Universal Music (Denmark) A/S. A Universal Music Company

I would like to automatically condense this to:

℗ & © 2000 Universal Music (Denmark) A/S. A Universal Music Company

I feel like the following formulas would be involved, but I’m not sure if they could be combined to accomplish it, or if there’s another solution:

- $regexp(x,e,r,c)

- $eql(x,y)

- $if(x,y,z)

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:** [August 15, 2022, 5:53am UTC](https://community.mp3tag.de/t/condensing-redundant-text/58205/2 "2022-08-15T05:53:49Z")

</div>

I put the text into the field COMMENT  
`$if($eql($regexp(%comment%,℗ (.*) © (.*)\. (.*),$1),$regexp(%comment%,℗ (.*) © (.*)\. (.*),$2)),$regexp(%comment%,℗ (.*) © (.*)\. (.*),℗ & © $1. $3),%comment%)`

You would have to replace %comment% with the real field name.

---

<div class="post-metadata">

**Author:** ![abijahmaniaco](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@abijahmaniaco](https://community.mp3tag.de/u/abijahmaniaco)\
**Post date:** [August 15, 2022, 4:09pm UTC](https://community.mp3tag.de/t/condensing-redundant-text/58205/3 "2022-08-15T16:09:54Z")

</div>

I was able to accomplish it with (an adaption of your code):

```auto
$if($eql($regexp(%copyright%,℗ (.*) © (.*),$1),$regexp(%copyright%,℗ (.*) © (.*),$2)),$regexp(%copyright%,℗ (.*) © (.*),℗ & © $1),%copyright%)

```

Thank you!

---

<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:** [September 14, 2022, 4:10pm UTC](https://community.mp3tag.de/t/condensing-redundant-text/58205/4 "2022-09-14T16:10:31Z")

</div>

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