# Help needed on regex for removing long stuff in title

**URL:** https://community.mp3tag.de/t/help-needed-on-regex-for-removing-long-stuff-in-title/13953
**Category:** Support
**Created:** [October 1, 2012, 9:19am UTC](https://community.mp3tag.de/t/help-needed-on-regex-for-removing-long-stuff-in-title/13953 "2012-10-01T09:19:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AgnesLP](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/7cd45c/32.png) [@AgnesLP](https://community.mp3tag.de/u/AgnesLP)
#### Post date: [October 1, 2012, 9:19am UTC](https://community.mp3tag.de/t/help-needed-on-regex-for-removing-long-stuff-in-title/13953/1 "2012-10-01T09:19:38Z")

</div>

Hi, I have read in full the [regular expression FAQ thread](http://tions,%20Replacing,%20Case%20conversion,%20Regular%20Expressions) but did not find one, and I must say my capacity to try write mine is limited...! I hoçpe the experts in this forum could give me a hand.

By mistake I have used before the tag to tag conversion to include in my titles:  
%albumartist% - %album% - %track% - %title%

I now would like to revert to the former titles I had (that were good in some cases, a bit messy in others, but never mind).

So I basically need to create an action to replace:  
**(anything any length with spaces) - (anything any length with spaces) - (0 to 99 digit but also sometimes 1/12 or alike) - TITLE**   
with ideally  
**TITLE**  
or alternatively  
**(0 to 99 digit but also sometimes 1/12 or alike) - TITLE**  
that is less clean but could be acceptable

I guess it can be done based on **finding the third' - ' and then deleting anything before?**  
But how do you do that?

Thanks a lot for insights  
Agnes

---

<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 1, 2012, 10:03am UTC](https://community.mp3tag.de/t/help-needed-on-regex-for-removing-long-stuff-in-title/13953/2 "2012-10-01T10:03:54Z")

</div>

> [@AgnesLP](#):
>
> ...finding the third' - ' and then deleting anything before?[/b]  
> But how do you do that?
> 
> Thanks a lot for insights  
> Agnes

You can create an acti9on of the type "Replace with regular expression for title tha throws everything away except the stuff after the last -:  
Search string:  
.\* - (.\*)  
Replace string  
$1

Due to the non-greedyness the regular expression starts at the end.

---

<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:24pm UTC](https://community.mp3tag.de/t/help-needed-on-regex-for-removing-long-stuff-in-title/13953/3 "2026-02-09T12:24:05Z")

</div>


