# Remove middle part in brackets from title

**URL:** https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137
**Category:** Support
**Created:** [May 28, 2020, 4:31am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137 "2020-05-28T04:31:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 4:31am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/1 "2020-05-28T04:31:21Z")

</div>

Hi, this is my first post so please understand if I don't get it right.  
My problem:

In some files the TITLE is too long and I want to remove part of it. I understand how to remove a part from the beginning or the end, but how to remove something from the middle?  
For instance (this is a fictive example)

Mozart - Pianoconcerto Nr. 25 (revised by Salieri) in E major, part 1 allegretto

I want to remove  
(revised by Salieri)  
in each of the tile tags.

---

<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: [May 28, 2020, 4:40am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/2 "2020-05-28T04:40:05Z")

</div>

> [@realiszt](#):
>
> Mozart - Pianoconcerto Nr. 25 (revised by Salieri) in E major, part 1 allegretto

Try an action of the type "Replace with regular expression"  
Search string: `\(.*\) `  
Replace string:  
(leave empty)  
Please note that there is a space as last character in the search string.

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 5:42am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/3 "2020-05-28T05:42:14Z")

</div>

Thank you for your reply, but since I am bit of a beginner in mp3tag I I really don't know how and where to use this.  
Can you be a bit more specific please?

---

<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: [May 28, 2020, 5:45am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/4 "2020-05-28T05:45:12Z")

</div>

> [@realiszt](#):
>
> I am bit of a beginner in mp3tag

So it would be nice if you could have a look at the FAQs first.

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967):
>
> Mp3tag provides a variety of actions, which can be applied to filenames and tags. The actions are grouped together into named sets (action groups), which can be applied independently via Alt + 6. If you do not want to create a reusable action group for applying one single action, the Actions (Quick) toolbar button or keyboard shortcut Shift + Alt + 6 can be used. How to [create a new action](https://community.mp3tag.de/t/actions/967/2)? How to ... [change upper/lower case of tag fields or filenames](https://community.mp3tag.de/t/actions/967/3)? [replace the string “xyz” in tag-fields …](https://community.mp3tag.de/t/actions/967/4)

And where do you think was my answer lacking the specific information?

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 5:52am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/5 "2020-05-28T05:52:43Z")

</div>

I already searched a lot, but did not find an exact instruction so far, hence my post.  
I will search your suggestions too, thanks. I need to know, for a beginner, in which box to put which command.

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 5:58am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/6 "2020-05-28T05:58:05Z")

</div>

For instance, to remove the first n characters from a title I found this very helpful command with an explanation where to put it (tag to tag):

TITLE \<== $cutLeft(%TITLE%,n)

I am looking for something similar for my question.

---

<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: [May 28, 2020, 6:07am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/7 "2020-05-28T06:07:23Z")

</div>

> [@realiszt](#):
>
> where to put it (tag to tag):

If you want to use Convert\>Tag-Tag for TITLE, try  
Format string: `$regexp(%title%,\(.*\) ,)`

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 7:33am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/8 "2020-05-28T07:33:40Z")

</div>

Sorry, but I still don't quite understand.  
When I put this in tag to tag nothing changes, but I presume I need to puit something between the brackets?  
Don't understand what all this stands for: `\(.*\) ,)`

---

<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: [May 28, 2020, 7:42am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/9 "2020-05-28T07:42:48Z")

</div>

> [@realiszt](#):
>
> but I presume I need to puit something between the brackets?

What would that be?  
As Convert\>Tag-Tag has a preview, you should see the immediate result, here: the string without that part in the brackets.  
Also, as you can see the input field in the dialogue is labelled "Format string".  
You copy and paste the string that I suggested into that field.

Now, a regular expression leads to no result (here: the string stays as it is) if the pattern does not match. So instead of giving

> [@Title edit to remove leading number](https://community.mp3tag.de/t/title-edit-to-remove-leading-number/10050/3):
>
> a fictive example

it would be better so see a real life string.

To see more about regular expressions, see the help:

> **[Replace with Regular Expression – Mp3tag Documentation](https://docs.mp3tag.de/actions/replace-regexp/)**
>
> Documentation on the Replace with Regular Expression action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

There is, of course, the way to replace a string constant with nothing, e.g. with an action of the type "Replace" for TITLE  
Search string: `(revised by Salieri)`  
Replace string:  
(leave empty)  
This works only for this exact string. if you have versions with "(revised by Clementi)" then it would not work - the regular expression would cater for both cases.

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 8:46am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/10 "2020-05-28T08:46:53Z")

</div>

> [@ohrenkino](#):
>
> $regexp(%title%,(.\*) ,)

Thank you for your patience. Although I am an experienced above average computer user I know nothing about scripting. I still cannot make sense of it, I am too stupid for this and need an explanation for a 3-year old.  
I go to Conversion Tag-Tag  
In the dialogue box upper line I see TITLE  
In the second line I put `$regexp(%title%,\(.*\) ,)`

But in the preview of the title underneath nothing changes. I guess I nee to put "revised by Salieri" somewhere in the second line?

---

<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: [May 28, 2020, 8:53am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/11 "2020-05-28T08:53:34Z")

</div>

> [@realiszt](#):
>
> But in the preview of the title underneath nothing changes. I guess I nee to put "revised by Salieri" somewhere in the second line?

As I said: the target string looks like the original string if the pattern cannot find a match in the original string.  
If you want to go withoug pattern but with a string constant, then use the second option: a simple replace.  
Or, and this has been suggested also already:

> [@Title edit to remove leading number](https://community.mp3tag.de/t/title-edit-to-remove-leading-number/10050/11):
>
> it would be better so see a real life string.

A string like  
"Mozart - Pianoconcerto Nr. 25(revised by Salieri)in E major, part 1 allegretto"  
would not match.  
Or any other string where you don't find the pattern "opening bracket, any text, closing bracket, space"

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 8:59am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/12 "2020-05-28T08:59:25Z")

</div>

Real life string, in another CD:

Orchestral Suite No. 2 in B minor, BWV 1067: Movement 4: Bourrée I / Bourrée

It is too long and contains double information, so I want it to look like this:

Orchestral Suite No. 2: Movement 4: Bourrée I / Bourrée

---

<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: [May 28, 2020, 9:03am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/13 "2020-05-28T09:03:49Z")

</div>

`$regexp(%title%, in .*?\d+,$1)`  
-\> "Orchestral Suite No. 2: Movement 4: Bourrée I / Bourrée"

So, with which real life string did you test the pattern that has the deletable string in brackets?

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 9:08am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/14 "2020-05-28T09:08:33Z")

</div>

I finally found the solution in alt-6, replace. It takes a bit more time because the part I want to replace it not the same everywhere, to give position numbers in the string would be easier, but it works. Thanks for all your trouble.

---

<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: [May 28, 2020, 9:15am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/15 "2020-05-28T09:15:13Z")

</div>

> [@realiszt](#):
>
> to give position numbers in the string would be easier

This is most likely not true if you have varying strings.  
In the examples that you provided, the first string started at position 28 and in the second in position 23 ...  
Anyway, you ware free to experiment and you may like to have look at the scripting functions esp. for strings.  
See the help:

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#string-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

perhaps with a close look at $left(), $right(), $mid()

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 9:18am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/16 "2020-05-28T09:18:41Z")

</div>

Thanks again. I will find my way eventually as I have in the past for other things. The last link is very helpful.  
The string part I want to remove is usually the same number of characters, but the characters are different.

---

<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: [May 28, 2020, 9:22am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/17 "2020-05-28T09:22:59Z")

</div>

> [@realiszt](#):
>
> usually the same number of characters

Perhaps this is sobering:  
"in B minor, BWV 1067:" = 21 characters,  
" (revised by Salieri)" = 20 characters.  
Still I don't get it how you want to cut a certain number of characters from a string if you don't know where to start ...

---

<div class="post-metadata">

### Author: ![realiszt](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@realiszt](https://community.mp3tag.de/u/realiszt)
#### Post date: [May 28, 2020, 9:36am UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/18 "2020-05-28T09:36:09Z")

</div>

They are two different examples.  
One of the real things is the Bach one, but with different BWV numbers and different key, but the string length is the same.

---

<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: [May 28, 2020, 12:27pm UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/19 "2020-05-28T12:27:36Z")

</div>

> [@realiszt](#):
>
> different BWV numbers and different key

And this is taken care of with the regular expression: the pattern ist: take everything starting with "in" and ends with the first number.

---

<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:28pm UTC](https://community.mp3tag.de/t/remove-middle-part-in-brackets-from-title/49137/20 "2026-02-09T12:28:36Z")

</div>


