# Removing contents inside parentheses....tweak

**URL:** <https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741>\
**Category:** Support\
**Created:** [November 26, 2011, 4:28pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741 "2011-11-26T16:28:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)\
**Post date:** [November 26, 2011, 4:28pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/1 "2011-11-26T16:28:20Z")

</div>

I've been using this to remove stuff inside which have mostly been at the end of the title field:

\s((.\*))

Works great, but now I have a bunch of files where the parentheses and are at the beginning of the title similar to:

(WEGWE) MYMP3FILE ROCKS

I want to remove the parentheses and the single space in between.

I've tried:

^ \s((.\*))

\s^((.\*))

But neither of these two to start at the beginning of the line does not work which I would expect that it would since it's being told to start at the start of line instead of defaulting at the end of line.

Can someone help me to fix this properly?

Thanks

Chris

---

<div class="post-metadata">

**Author:** ![CheeseTurtle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/ad7895/32.png) [@CheeseTurtle](https://community.mp3tag.de/u/CheeseTurtle)\
**Post date:** [November 26, 2011, 4:39pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/2 "2011-11-26T16:39:08Z")

</div>

I'm kind of a regexp newb, but shouldn't the \s be at the end instead of the beginning?

^((.\*))\s

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [November 26, 2011, 5:33pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/3 "2011-11-26T17:33:51Z")

</div>

> [@kittmaster](#):
>
> I've been using this to remove stuff inside which have mostly been at the end of the title field:
> 
> Can someone help me to fix this properly?
> 
> Thanks
> 
> Chris

_Action type:_ **Replace with regular expression**  
_Field:_ **\_TAG** **(Use whatever you want here, as you have not stated in your post)**  
_Regular expression:_ **(\w+)\s|\s(\w+)$**  
_Replace matches with:_

[] case-sensitive comparison

This makes in one reg exp:  
(WE11GWE) MYMP3FILE (WEGWE) ROCKS (WEGWE)  
**TO**  
MYMP3FILE ROCKS

MYMP3FILE (WEGWE) ROCKS (WEGWE)  
**TO**  
MYMP3FILE ROCKS

MYMP3FILE (WEGWE) ROCKS  
**TO**  
MYMP3FILE ROCKS

MYMP3FILE ROCKS (WEGWE)  
**TO**  
MYMP3FILE ROCKS

Explanation:  
**(** matches '('  
**\w+** matches single word character 'letters digits etc' the **+** adds find this an unlimited no. of times.  
**)** matches ')'  
**\s** matches one whitespace character.  
**|** OR match reg exp no.2 also.  
**\s** matches one whitespace character.  
**(** matches '('  
**\w+** matches single word character 'letters digits etc' the **+** adds find this an unlimited no. of times.  
**)** matches ')'  
**$** asserts position of text string at end of line.

Hope this helps :]

---

<div class="post-metadata">

**Author:** ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)\
**Post date:** [November 26, 2011, 6:50pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/4 "2011-11-26T18:50:58Z")

</div>

Thank you both, this does solve my issue and I have better understanding....TY!

Chris

---

<div class="post-metadata">

**Author:** ![Dasyurus](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@Dasyurus](https://community.mp3tag.de/u/Dasyurus)\
**Post date:** [July 1, 2019, 3:44am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/5 "2019-07-01T03:44:27Z")

</div>

Hi,

I have just tried this expression:

"[quote="stevehero, post:3, topic:12741"]  
_Action type:_ **Replace with regular expression**  
_Field:_ **\_TAG** **(Use whatever you want here, as you have not stated in your post)**  
_Regular expression:_ **(\w+)\s|\s(\w+)$**  
_Replace matches with:_  
[/quote]

However, when used on the %albumartistsort% field where I have the following text:

Alexander Ivashkin (cello); Cristina Ortiz (piano); David Oistrakh (violin)

It returns the following result:

(cello); (piano); (violin)

This is the opposite of what I would like. i.e. just the names retained, but parentheses and content deleted.

Can anyone please suggest a solution to achieve the removal of ALL instances of parenthetical content?

---

<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 1, 2019, 5:11am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/6 "2019-07-01T05:11:39Z")

</div>

Try an action of the type "Replace with regular expression" für ALBUMARTISTSORT  
Search string: `\s\(\w+\)`  
Replace string:  
(leave empty)

---

<div class="post-metadata">

**Author:** ![Dasyurus](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@Dasyurus](https://community.mp3tag.de/u/Dasyurus)\
**Post date:** [July 1, 2019, 9:53am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/7 "2019-07-01T09:53:42Z")

</div>

Thanks very much for your quick response, but unfortunately when I repeat the action you suggest I have no change at all to the field contents.

**Before** : Alexander Ivashkin (cello); Cristina Ortiz (piano); David Oistrakh (violin)

Action - Field: ALBUMARTISTSORT  
Regular expression: `\s(\w+)  
Replace matches with:

**After** : Alexander Ivashkin (cello); Cristina Ortiz (piano); David Oistrakh (violin)

---

<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 1, 2019, 9:58am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/8 "2019-07-01T09:58:28Z")

</div>

you are right.  
I forgot the closing accent -grave and the `#@!"§$&` formatter left out the important brackets.  
the correct search string would be:  
`\s\(\w+\)`

---

<div class="post-metadata">

**Author:** ![Dasyurus](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@Dasyurus](https://community.mp3tag.de/u/Dasyurus)\
**Post date:** [July 1, 2019, 10:07am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/9 "2019-07-01T10:07:13Z")

</div>

> [@ohrenkino](#):
>
> \s(\w+)

Brilliant! It worked just as I wanted. Thanks again

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [July 1, 2019, 10:23am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/10 "2019-07-01T10:23:37Z")

</div>

That regexp may lead to unwanted whitespace characters.

Here's another way to skin a cat. [PRESS THIS TEST BUTTON](https://regexr.com/4gn2u)

```auto
\s*\([^\)]+?\)\s*

```

---

<div class="post-metadata">

**Author:** ![Dasyurus](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@Dasyurus](https://community.mp3tag.de/u/Dasyurus)\
**Post date:** [July 1, 2019, 10:36am UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/11 "2019-07-01T10:36:54Z")

</div>

> [@stevehero](#):
>
> \s\*([^)]+?)\s\*

Thank you for this. It works a treat and keeps it tidy.

---

<div class="post-metadata">

**Author:** ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)\
**Post date:** [July 1, 2019, 12:44pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/12 "2019-07-01T12:44:16Z")

</div>

Holy thread resurrection......LOL.

😉

---

<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, 2026, 12:23pm UTC](https://community.mp3tag.de/t/removing-contents-inside-parentheses-tweak/12741/13 "2026-02-09T12:23:28Z")

</div>


