# Remove everything after the closing parenthesis

**URL:** https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327
**Category:** Support
**Created:** [October 22, 2024, 6:43am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327 "2024-10-22T06:43:58Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![tdog](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tdog](https://community.mp3tag.de/u/tdog)
#### Post date: [October 22, 2024, 6:43am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/1 "2024-10-22T06:43:58Z")

</div>

Hi, guys! I need to remove everything after the right parethesis in the title.  
Source: Song Name (Remix) some text  
Expected result: Song Name (Remix)

---

<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: [October 22, 2024, 7:46am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/2 "2024-10-22T07:46:08Z")

</div>

Try an action of the type "Format value" or Convert \> Tag-Tag for TITLE  
Format string: `$regexp(%title%,'(.*\)).*',$1)`

Please note that

> [@tdog](#):
>
> everything after the right parethesis in the title

also applies to e.g.  
(Bigger & Better) Lies - Thompson Twins  
(Don't Go Back to) Rockville - R.E.M.  
(Flying on The) Wings of Love - Level 42  
(It's not War) Just the End of Love - Manic Street Preachers

---

<div class="post-metadata">

### Author: ![tdog](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/d07c76/32.png) [@tdog](https://community.mp3tag.de/u/tdog)
#### Post date: [October 22, 2024, 1:14pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/3 "2024-10-22T13:14:49Z")

</div>

Thanks, it did exactly what i needed.

---

<div class="post-metadata">

### Author: ![dapel](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dapel](https://community.mp3tag.de/u/dapel)
#### Post date: [October 27, 2024, 1:27pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/4 "2024-10-27T13:27:10Z")

</div>

I am looking to do the same, but instead of (parentheses) I have [brackets]. How would I edit this expression to do the same?

Also, if I have multiple brackets in a title, how do I remove everything after a certain bracket?

Thanks in advance.

---

<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: [October 27, 2024, 1:36pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/5 "2024-10-27T13:36:16Z")

</div>

Could you give real examples, please?  
And tell us, what you have tried so far?

See also here:

> [@Regex: Remove 2nd set of parenthesis in TITLE](https://community.mp3tag.de/t/regex-remove-2nd-set-of-parenthesis-in-title/65712):
>
> 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: ![dapel](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dapel](https://community.mp3tag.de/u/dapel)
#### Post date: [October 27, 2024, 2:13pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/6 "2024-10-27T14:13:07Z")

</div>

Here are some title samples:

Love Me [Mixshow Edit] [Clean] 90 8A  
All Night Long [Album Edit] 99 10A  
Somebody's Watching Me [2023 Spooky Bootleg] Clean Cut  
I Love It [Flip] [Custom Edit] [Acap In] Clean

Hope this helps; let me know if you need any others.

I tried using replace with a wildcard, but as I am a notice with expressions I wasn't able to make the desired changes.

---

<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: [October 27, 2024, 2:15pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/7 "2024-10-27T14:15:10Z")

</div>

> [@dapel](#):
>
> Love Me [Mixshow Edit] [Clean] 90 8A

Try  
`$regexp(%title%,'(.*\]).*',$1)`

---

<div class="post-metadata">

### Author: ![dapel](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@dapel](https://community.mp3tag.de/u/dapel)
#### Post date: [October 27, 2024, 2:43pm UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/8 "2024-10-27T14:43:52Z")

</div>

That worked; thank you!

---

<div class="post-metadata">

### Author: ![mbrazil05](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mbrazil05](https://community.mp3tag.de/u/mbrazil05)
#### Post date: [November 14, 2024, 3:20am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/9 "2024-11-14T03:20:40Z")

</div>

`$regexp(%title%,'(.*\]).*',$1)`

i'm curious but can you break this code down and explain what each section is and is doing?

---

<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 14, 2024, 7:08am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/10 "2024-11-14T07:08:56Z")

</div>

See the documentation:

> **[Regular Expressions – Mp3tag Documentation](https://docs.mp3tag.de/regex/)**
>
> Documentation on support for regular expressions in Mp3tag. Mp3tag is the universal Tag Editor.

and all in all it takes any number or any character until a square bracket appears and stores it in $1 and then it addresses everything following the square bracket. And then it returns the value stored in $1.

See also here for other solutions:

> [@Remove everything from first parenthese going forward](https://community.mp3tag.de/t/remove-everything-from-first-parenthese-going-forward/63376):
>
> how do I create an action that will remove everything from the first parentheses going forward. ie. track name: Molly (ULTI-reMIX by Mark Roberts). I want to remove "(ULTI-reMIX by Mark Roberts)"

---

<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 14, 2024, 7:09am UTC](https://community.mp3tag.de/t/remove-everything-after-the-closing-parenthesis/66327/11 "2024-12-14T07:09:01Z")

</div>

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