# Deleting everything up to a character (REGEXP)

**URL:** https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496
**Category:** Support
**Created:** [February 20, 2007, 7:22pm UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496 "2007-02-20T19:22:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dizwell](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@dizwell](https://community.mp3tag.de/u/dizwell)
#### Post date: [February 20, 2007, 7:22pm UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/1 "2007-02-20T19:22:58Z")

</div>

This is probably very basic, but I saw nothing in the FAQ about it, and I didn't have any luck with constructing a search string that produced results.

If I have a title of **Recit: Bellissima Romilda (Serse)**, what is the regular expression to remove everything up to the first colon-plus-space?

And what would the regular expression be to remove everything from the last-space-plus-open-bracket to the end of the string?

I am almost certain it would be possible to construct a single regular expression to do both things, but I think seeing two separate ones would help me learn the principles better.

I want to end up with a title of just **Bellissima Romilda** , in other words.

---

<div class="post-metadata">

### Author: ![dizwell](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@dizwell](https://community.mp3tag.de/u/dizwell)
#### Post date: [February 21, 2007, 3:40am UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/2 "2007-02-21T03:40:45Z")

</div>

Replying to your own posts is probably the first sign of madness, but I've managed to achieve the result I was after, despite not having a clue what I was doing! So if anyone else is ever minded to convert a track such as:

**Recit: Some text (sung by Elvira)**

...to plain old

**Some text**

...then the answer was to create two actions.

First, the colon stripper: the action type is 'Format value', the field is TITLE, the format string is

**$regexp(%TITLE%,^(._)(: )(._)$,$3)**

Second, the bracket stripper: Action type is Replace with regular expression, the field is TITLE, the regular expression is

**^(._)(()(._)$**

...and the Replace matches with is $1.

I figure the first example could be created as a 'replace with regular expression', too, in the same fashion as the second example. Or vice versa, I suppose. But this worked for me, so I'm not messing with it!

---

<div class="post-metadata">

### Author: ![studley](https://community.mp3tag.de/user_avatar/community.mp3tag.de/studley/32/144_2.png) [@studley](https://community.mp3tag.de/u/studley)
#### Post date: [March 25, 2007, 6:57pm UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/3 "2007-03-25T18:57:47Z")

</div>

> [@Dizwell](#):
>
> Second, the bracket stripper: Action type is Replace with regular expression, the field is TITLE, the regular expression is
> 
> **^(._)(()(._)$**
> 
> ...and the Replace matches with is $1.

I'm looking for something similar and was wondering if someone could help. I want to strip anything within brackets including: , { } , and ( ). Additionally, there could be multiple brackets within the filename.

Thanks,  
David

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [March 26, 2007, 6:20am UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/4 "2007-03-26T06:20:20Z")

</div>

> [@studley](#):
>
> I'm looking for something similar and was wondering if someone could help. I want to strip anything within brackets including: , { } , and ( ). Additionally, there could be multiple brackets within the filename.Thanks,David

I think you need no similar regexp function but a simple replace function.  
Create an action group and in there a series of replace actions.  
Each action should replace one of your desired characters to remove, e.g. replace '**[**' (open bracket character) by a ' ' (space character), and so on.  
If double spaces would be created in this process add a last action to replace double spaces by one space.

DD.20070326.1020

---

<div class="post-metadata">

### Author: ![mainyak](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@mainyak](https://community.mp3tag.de/u/mainyak)
#### Post date: [March 26, 2007, 7:03am UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/5 "2007-03-26T07:03:30Z")

</div>

> [@Dizwell](#):
>
> Replying to your own posts is probably the first sign of madness, but I've managed to achieve the result I was after, despite not having a clue what I was doing! So if anyone else is ever minded to convert a track such as:
> 
> **Recit: Some text (sung by Elvira)**
> 
> ...to plain old
> 
> **Some text**
> 
> ...then the answer was to create two actions.
> 
> First, the colon stripper: the action type is 'Format value', the field is TITLE, the format string is
> 
> **$regexp(%TITLE%,^(._)(: )(._)$,$3)**
> 
> Second, the bracket stripper: Action type is Replace with regular expression, the field is TITLE, the regular expression is
> 
> **^(._)(()(._)$**
> 
> ...and the Replace matches with is $1.
> 
> I figure the first example could be created as a 'replace with regular expression', too, in the same fashion as the second example. Or vice versa, I suppose. But this worked for me, so I'm not messing with it!

Although you did manage to get it working, I will still reply with another way, which would probaly be faster if you are doing a lot of files.

You could replace everything with one "replace with regular expression":

**Field:** TITLE  
**Regular Expression:** ^.+?:\ (.+?)\ (.+)$  
**Replace With:** $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: [February 9, 2026, 12:20pm UTC](https://community.mp3tag.de/t/deleting-everything-up-to-a-character-regexp/4496/6 "2026-02-09T12:20:10Z")

</div>


