# Remove words between round brackets + the brackets

**URL:** https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481
**Category:** Support
**Created:** [December 5, 2009, 12:43pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481 "2009-12-05T12:43:44Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Rbox](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/dc4da7/32.png) [@Rbox](https://community.mp3tag.de/u/Rbox)
#### Post date: [December 5, 2009, 12:43pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/1 "2009-12-05T12:43:44Z")

</div>

Hi all,

I've got some files with words between round brackets in tags and filename and I want to get rid of the stuff like:  
original: (We are) The Road Crew  
what I want: The Road Crew

But this for multiple files at once where the words between brackets of course vary in length.

How do i do this?

---

<div class="post-metadata">

### Author: ![RevRagnarok](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/b487fb/32.png) [@RevRagnarok](https://community.mp3tag.de/u/RevRagnarok)
#### Post date: [December 5, 2009, 1:00pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/2 "2009-12-05T13:00:03Z")

</div>

Regular Expressions

Replace: `\(.+\)\s*`  
With: (nothing)

What it means: ( followed by anything followed by ) followed by 0 or more spaces (which I assume you also wanted removed)

---

<div class="post-metadata">

### Author: ![Rbox](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/dc4da7/32.png) [@Rbox](https://community.mp3tag.de/u/Rbox)
#### Post date: [December 5, 2009, 1:22pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/3 "2009-12-05T13:22:50Z")

</div>

You're fantastic.

Thanks.

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 5:18am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/4 "2018-07-08T05:18:04Z")

</div>

I don't understand, this does not appear to function as described.

I followed the instructions and came up with the following:

> [#0]  
> T=4  
> F=TITLE  
> 1=(.+)\s\*  
> 2=  
> 3=0
> 
> [#1]  
> T=4  
> F=\_FILENAME  
> 1=(.+)\s\*  
> 2=  
> 3=0

But this actually deletes everything, not just text between brackets and the brackets themselves. What am I doing wrong?

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 5:32am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/5 "2018-07-08T05:32:57Z")

</div>

Looking around I think this is a better solution:

> [#0]  
> T=4  
> F=TITLE  
> 1= \(.+\)  
> 2=  
> 3=1
> 
> [#1]  
> T=4  
> F=\_FILENAME  
> 1= \(.+\)  
> 2=  
> 3=1

This also removes the space before the file extension which is otherwise produced.

Now I am going to try and work out conditional formatting so this action does not run on anything which has (Hidden Track) in the title/filename.

Does anyone know why double backslashes are removed from posts?

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 6:05am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/6 "2018-07-08T06:05:04Z")

</div>

Been reading through the forum and have not been able to find what I am looking for.

Essentially I want to run the action I previously mentioned but filter any tracks which contain '(Hidden Track)' in the title/filename.

I have seen examples of $if statements but nothing like 'change files unless contains '(Hidden Track)''

I could run a filter in mp3 tag first but I would rather this was done with the action script. Any ideas?

---

<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 8, 2018, 9:10am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/7 "2018-07-08T09:10:52Z")

</div>

> [@sheepdisease](#):
>
> Does anyone know why double backslashes are removed from posts?

You have to enclose the text that is supposed to be taken literally but contains backslashes into the backwards accent (accent grave)  
`like this`

---

<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 8, 2018, 9:13am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/8 "2018-07-08T09:13:20Z")

</div>

> [@sheepdisease](#):
>
> Essentially I want to run the action I previously mentioned but filter any tracks which contain '(Hidden Track)' in the title/filename.

You cannot filter with an action.  
You would have to to use $if() statements in actions.

If you want to come back to the initial problem to remove anything in parenthesis, it may also be a way to use an action of the type "Guess value"  
Like  
Source: %title%  
Pattern: %title% (%dummy%)

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 9:42am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/9 "2018-07-08T09:42:24Z")

</div>

Is this right?

> [#0]  
> T=4  
> F=TITLE  
> 1=$if2(\(Hidden Track\)),( \(.+\))  
> 2=  
> 3=1
> 
> [#1]  
> T=4  
> F=\_FILENAME  
> 1=$if2(\(Hidden Track\)),( \(.+\))  
> 2=  
> 3=1

---

<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 8, 2018, 9:45am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/10 "2018-07-08T09:45:51Z")

</div>

> [@sheepdisease](#):
>
> Is this right?

Have you tried it? And how would I know, I do not have your set of data.

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 9:48am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/11 "2018-07-08T09:48:19Z")

</div>

I tested it prior to adding the if2 condition and it removed anything between rounded brackets and the rounded brackets. I just tried it on a track which contained '(Hidden Track)' at the end and it did not remove the wording so I think it is correct.

Surely you can tell by looking at the coding?

If I were to develop this further, how could I make mp3tag look for 'Hidden Track' within rounded brackets but not specifically when it only contains the exact phrase '(Hidden Track)' but could include other words as well?

---

<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 8, 2018, 1:49pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/12 "2018-07-08T13:49:42Z")

</div>

> [@sheepdisease](#):
>
> not specifically when it only contains the exact phrase '(Hidden Track)' but could include other words as well?

something like:  
`$ifgreater($strstr('Get Ready Hidden Track',$regexp('(We are) The Road Crew (Hidden Track)','.*\((.*)\)',$1)),0,yes,no)`  
In the example, strings with any single word or words following the order of the search string will be excluded in the "yes" action.

You have to enter the action for yes and the one for no.  
Also, replace the string constant in the $regexp() with the correct field name.  
The string constant in $strstr() can be appended by more or less any word or combination that you want to include in the blacklist.

---

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [July 8, 2018, 2:41pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/13 "2018-07-08T14:41:54Z")

</div>

Thank you so much for your reply.

If greater makes the code look for anything other than 'Get Ready Hidden Track' and it does not match, it replaces it with '(We are) The Road Crew (Hidden Track)'?

Would this be able to cope? I'm not sure I was particularly clear so what I meant was provided the phrase 'Hidden Track' is found within rounded brackets, the code should not delete anything within those brackets.

Here is an example of a track which I would not want to edit from Coldplay\Parachutes:

10 Everything's Not Lost (Includes Hidden Track 'Life Is For Living')

---

<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 8, 2018, 5:57pm UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/14 "2018-07-08T17:57:42Z")

</div>

The expression that I supplied assumed that you have the string part "(Hidden Track)" in the title.  
It was not at all clear that "Hidden Track" was somewhere inside the parenthesis.  
In this case I do not see any possibility to get a certain set of words out of an amorphous string.  
My attempt cut anything from inside the parenthesis and compared it with a list of keywords to then execute the true or false branch.  
Just to make it clear: you have to have unique constant identifiers or separators to get a variable string or supply a string constant to evaluate a variable string. Having both as variables does not work in one action, you would have to treat each case separately and supply at least one constant.

---

<div class="post-metadata">

### Author: ![bascurtiz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@bascurtiz](https://community.mp3tag.de/u/bascurtiz)
#### Post date: [July 27, 2023, 10:32am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/15 "2023-07-27T10:32:15Z")

</div>

I've tried what is suggested here....

But that results in TITLE being empty (instead of just removing all the brackets and all that is within brackets).

Suggestions welcome!

 ![image](https://community.mp3tag.de/uploads/default/original/2X/7/75d0ca339214138cd4dbf7f9d8bced0ca5e1040e.png)

---

<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 27, 2023, 10:37am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/16 "2023-07-27T10:37:42Z")

</div>

> [@bascurtiz](#):
>
> I've tried what is suggested here....

AFAI can see this has been suggested.

> [@ohrenkino](#):
>
> `\((.*)\)`

You did not escape the brackets.  
It should be  
`\(.*\)\s*`

---

<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: [August 26, 2023, 10:38am UTC](https://community.mp3tag.de/t/remove-words-between-round-brackets-the-brackets/9481/17 "2023-08-26T10:38:26Z")

</div>

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