# How would I trim "comments" to erase everything before \*/ /\*?

**URL:** <https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531>\
**Category:** Support\
**Created:** [January 10, 2021, 3:19am UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531 "2021-01-10T03:19:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex151](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@alex151](https://community.mp3tag.de/u/alex151)\
**Post date:** [January 10, 2021, 3:19am UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/1 "2021-01-10T03:19:23Z")

</div>

I have duplicate data in comments section, each set of duplicates is separated by _/ /_, how would i trim everything before _/ /_, including the first \*/ ?

Ive tried looking it up in the forums but couldn't find anything that worked.. note, I'm not much of a scripter, so please go easy on me 🙂

Thank you!

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [January 10, 2021, 6:33am UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/2 "2021-01-10T06:33:43Z")

</div>

> [@alex151](#):
>
> including the first \*/

Do I unterstand you right:  
You want to keep 1 "/" in front of the comment-text and by "trim" you mean erase?  
Or do you want to remove white space before the "/".

---

<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:** [January 10, 2021, 8:02am UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/3 "2021-01-10T08:02:36Z")

</div>

I think it would be best if you could post example content from the comment field in question enclosed in backticks ```, e.g., ``my comment`` and mention what should be preserved after trimming.

---

<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:** [January 10, 2021, 11:59am UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/4 "2021-01-10T11:59:38Z")

</div>

> [@alex151](#):
>
> I have duplicate data in comments section

You could try either an action of the type "Merge duplicate fields but use a different separator than `\\`  
or and action of the type "Remove duplicate fields" to keep the first found field of the given name.

---

<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:** [January 10, 2021, 12:01pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/5 "2021-01-10T12:01:37Z")

</div>

> [@ohrenkino](#):
>
> You could try either an action of the type "Merge duplicate fields but use a different separator than `\\`  
> or and action of the type "Remove duplicate fields"

This only works if the fields are separate fields and displayed with `\\` as separator and not — as stated in the OT — with `//`. That's why I was asking for a concrete example.

---

<div class="post-metadata">

**Author:** ![alex151](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@alex151](https://community.mp3tag.de/u/alex151)\
**Post date:** [January 10, 2021, 2:41pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/6 "2021-01-10T14:41:32Z")

</div>

Thank you for the reply guys..

Here is a sample  
/\* Morning / Chill / Vocal _/ /_ Morning / Chill / Vocal \*/

Currently the comments section looks like this, I just want to keep one set of these tags, removing second set which starts at second /\*

---

<div class="post-metadata">

**Author:** ![alex151](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@alex151](https://community.mp3tag.de/u/alex151)\
**Post date:** [January 10, 2021, 2:43pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/7 "2021-01-10T14:43:10Z")

</div>

Tried that, no luck..  
It has to be in separate fields

---

<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:** [January 10, 2021, 3:08pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/8 "2021-01-10T15:08:51Z")

</div>

Then perhaps an action "Format value" for COMMENT may be better:  
Format string: `$regexp(%comment%,.*?\*\/(.*),$1)`

---

<div class="post-metadata">

**Author:** ![alex151](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@alex151](https://community.mp3tag.de/u/alex151)\
**Post date:** [January 10, 2021, 6:44pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/9 "2021-01-10T18:44:16Z")

</div>

> [@ohrenkino](#):
>
> $regexp(%comment%,._?\*/(._),$1)

Thank you SOOOO much! That worked like a charm! 🙂

---

<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:** [February 9, 2021, 6:44pm UTC](https://community.mp3tag.de/t/how-would-i-trim-comments-to-erase-everything-before/51531/10 "2021-02-09T18:44:20Z")

</div>

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