# Move Part of Title

**URL:** https://community.mp3tag.de/t/move-part-of-title/13490
**Category:** Support
**Created:** [May 27, 2012, 8:56am UTC](https://community.mp3tag.de/t/move-part-of-title/13490 "2012-05-27T08:56:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Maquiavelito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@Maquiavelito](https://community.mp3tag.de/u/Maquiavelito)
#### Post date: [May 27, 2012, 8:56am UTC](https://community.mp3tag.de/t/move-part-of-title/13490/1 "2012-05-27T08:56:42Z")

</div>

Hi, I just joined the forum this evening. Great software and a very useful site, by the way. I've found lots of useful stuff here so far.

I've been trying to figure out how to solve a particular problem. I've found some posts in the FAQs that are close to what I want; but, as the scripting thing is very new to me, I can't figure out how to adapt them to suit my specific needs. So here's my situation:

I have hundreds of songs that are titled like this:

BWV589 Allabreve in D major,  
BWV605 Der Tag der ist so freudenreich,

What I want is to have this instead:

Allabreve in D major, BWV589  
Der Tag der ist so freudenreich, BWV605

I tried rearranging some song titles, like the above, using the 'replace with regular expression' action where I specified the parts of the song (i.e., (.\*), etc., depending on how may parts there were) and then rearranged them (i.e., $2 $3 $1, etc.). This seemed to work. However, all of the song titles are of varying lengths. So, it doesn't quite seem to be the most efficient way to change hundreds of titles.

In short, I'd like to learn how to move the first part of the song title (i.e., the BWV number, which is different for each song) to the very end of the song title irrespective of how many parts there are in the title and regardless of the fact that each BWV number is different.

I'd be grateful if anyone could set me straight on this.

---

<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: [May 27, 2012, 9:15am UTC](https://community.mp3tag.de/t/move-part-of-title/13490/2 "2012-05-27T09:15:19Z")

</div>

> [@Maquiavelito](#):
>
> ... So here's my situation:  
> I have hundreds of songs that are titled like this:  
> BWV589 Allabreve in D major,  
> BWV605 Der Tag der ist so freudenreich,  
> What I want is to have this instead:  
> Allabreve in D major, BWV589  
> Der Tag der ist so freudenreich, BWV605 ...

Set Filter to:

**TITLE MATCHES "^BWV"**

There are several ways to reach the goal.  
One way can be using the converter "Tag - Tag" together with a Regular Expression function ...

 

**Convert** | **Tag - Tag** | **ALT+5**

 

_Select format string_

 

Field:  
**TITLE**

 

Format string:  
**$regexp(%TITLE%,'^(.+?)\s(.+?,)$','$2 $1')**

 

Preview  
From:  
**BWV589 Allabreve in D major,**  
To:  
**Allabreve in D major, BWV589**

 

Another way can be using actions ...

Begin Action Group **Test\_2012#20120527.GuessValues** 

Action #1  
_Actiontype 7:_ **Import tag fields (guess values)**  
_Source format \_\_:_ **%TITLE%**  
_Guessing pattern:_ **%TMP1% %TMP2%**

 

Action #2  
_Actiontype 5:_ **Format value**  
_Field \_\_\_\_\_\_:_ **TITLE**  
_Formatstring:_ **%TMP2% %TMP1%**

 

Action #3  
_Actiontype 9:_ **Remove fields**  
_Fields to remove (semicolon separated):_ **TMP1;TMP2**

 

End Action Group **Test\_2012#20120527.GuessValues** (3 Actions)

 

Another way can be using action "Replace with regular expression" ...

 Begin Action Group **Test\_2012#20120527.GuessValues.2** 

Action #1  
_Actiontype 4:_ **Replace with regular expression**  
_Field \_\_\_\_\_\_\_\_\_\_\_\_\_\_:_ **TITLE**  
_Regular expression \_:_ **^(.+?)\s(.+?,)$**  
_Replace matches with:_ **$2 $1**

 [\_] Case sensitive comparison 

End Action Group **Test\_2012#20120527.GuessValues.2** (1 Action)

 

DD.20120527.1325.CEST

---

<div class="post-metadata">

### Author: ![Maquiavelito](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@Maquiavelito](https://community.mp3tag.de/u/Maquiavelito)
#### Post date: [May 27, 2012, 12:20pm UTC](https://community.mp3tag.de/t/move-part-of-title/13490/3 "2012-05-27T12:20:03Z")

</div>

Hi, thanks so much for your thorough explanation and quick response. I used the first method, and it worked absolutely beautifully! Cheers!

---

<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/move-part-of-title/13490/4 "2026-02-09T12:23:52Z")

</div>


