# Regex: Remove 2nd set of parenthesis in TITLE

**URL:** https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712
**Category:** Support
**Created:** [August 24, 2024, 3:22am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712 "2024-08-24T03:22:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![HaywoodJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@HaywoodJ](https://community.mp3tag.de/u/HaywoodJ)
#### Post date: [August 24, 2024, 3:22am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/1 "2024-08-24T03:22:49Z")

</div>

Evening Gents. This has been 'answered' on numerous posts but unfortunately I have yet to find any of the example regex postings to work (typically deletes everything but the actual song title). I have a few songs with TITLE like  
**Something (Ft Mama Jane) (Prod. None)**

I want to remove the second set of parenthesis completely so it just says  
**Something (Ft Mama Jane)**

Can anyone clue me into the expression to use?

---

<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 24, 2024, 6:10am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/2 "2024-08-24T06:10:03Z")

</div>

Try:  
`$regexp('Something (Ft Mama Jane) (Prod. None)','(.*\)) \(.*\)',$1)`

---

<div class="post-metadata">

### Author: ![HaywoodJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@HaywoodJ](https://community.mp3tag.de/u/HaywoodJ)
#### Post date: [August 24, 2024, 6:39am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/3 "2024-08-24T06:39:28Z")

</div>

It stripped everything...Made it just say **Something**

Would it be easier to just ask how to regex and remove anything that is **(Prod.**

---

<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 24, 2024, 6:41am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/4 "2024-08-24T06:41:45Z")

</div>

> [@HaywoodJ](#):
>
> It stripped everything

So what did you enter and have as data?  
It worked over here:

 ![grafik](https://community.mp3tag.de/uploads/default/original/3X/1/0/10cc71cad60c5f112c64995e7e5159d78d6ce883.png)

---

<div class="post-metadata">

### Author: ![HaywoodJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@HaywoodJ](https://community.mp3tag.de/u/HaywoodJ)
#### Post date: [August 24, 2024, 6:55am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/5 "2024-08-24T06:55:26Z")

</div>

> [@ohrenkino](#):
>
> regexp('Something (Ft Mama Jane) (Prod. None)','(._)) (._)',$1)

You are correct; it works on that particular song. i should have probably led with that; that is my fault

What i meant to say was that it doesnt work on other songs unless i implicitly add the song title and the Ft quote for the new song. Is there a way to do it so it dynamically does that to all songs I have that are like that?

---

<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 24, 2024, 6:58am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/6 "2024-08-24T06:58:44Z")

</div>

I assumed that you are able to replace the fixed string with the field variable.  
So, does  
`$regexp(%title%,'(.*\)) \(.*\)',$1)`  
work?  
... and it would really help if you showed real examples, preferably with a screenshot.

---

<div class="post-metadata">

### Author: ![HaywoodJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@HaywoodJ](https://community.mp3tag.de/u/HaywoodJ)
#### Post date: [August 24, 2024, 7:18am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/7 "2024-08-24T07:18:58Z")

</div>

I realized what I was doing wrong. I was doing it under actions (which doesnt work there) instead of under convert using tag-tag.

That works! I appreciate it!

---

<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 24, 2024, 7:21am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/8 "2024-08-24T07:21:52Z")

</div>

> [@HaywoodJ](#):
>
> I was doing it under actions (which doesnt work there)

It does work with an action of the type "Format value".  
If you want to use "Replace with regular expression", you have to split up the 3 parts of $regexp() into the 3 parameters in the action dialogue.  
But again: all these different assumptions could have been avoided with screenshots.

---

<div class="post-metadata">

### Author: ![anon32189785](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@anon32189785](https://community.mp3tag.de/u/anon32189785)
#### Post date: [August 24, 2024, 9:51am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/9 "2024-08-24T09:51:31Z")

</div>

needle: `"(\)) \(.*"`  
replacement: `"$1"`

---

<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 23, 2024, 9:51am UTC](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712/10 "2024-09-23T09:51:37Z")

</div>

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