# Swapping text in %title%

**URL:** https://community.mp3tag.de/t/swapping-text-in-title/8886
**Category:** Support
**Created:** [September 2, 2009, 6:33pm UTC](https://community.mp3tag.de/t/swapping-text-in-title/8886 "2009-09-02T18:33:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nickgray](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/d78d45/32.png) [@nickgray](https://community.mp3tag.de/u/nickgray)
#### Post date: [September 2, 2009, 6:33pm UTC](https://community.mp3tag.de/t/swapping-text-in-title/8886/1 "2009-09-02T18:33:52Z")

</div>

Ok, so I've tried searching and reading faq to find the solution to this thing, but failed, unfortunately. What I need is this, basically:

Etude Op.10, No.11 In E-Flat Major - Allegretto

switched to

Etude No.11 In E-Flat Major - Allegretto, Op.10

trouble is, there are 24 etudes (e.g. tagged No.1, No.2, No.3, etc.) and I've no idea how to include fields like No._number_. I hope it makes sense 🙂

---

<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: [September 2, 2009, 6:55pm UTC](https://community.mp3tag.de/t/swapping-text-in-title/8886/2 "2009-09-02T18:55:00Z")

</div>

> [@nickgray](#):
>
> ... What I need is this, basically:  
> Etude Op.10, No.11 In E-Flat Major - Allegretto  
> switched to  
> Etude No.11 In E-Flat Major - Allegretto, Op.10  
> ...

You may create an action using a regular expression to divide the title string into parts and put the parts together into new sequence:

_Actiontype 5:_ **Format tag field**  
_Field:_ **TITLE**  
_Formatstring:_ **$regexp(%title%,'^(.+?)÷(Op.\d+),÷(No.\d+)÷(.+?)$','$1÷$3÷$4,÷$2')**

... or ...

_Actiontype 4:_ **Replace with regular expression**  
_Field:_ **TITLE**  
_Regular expression:_ **^(.+?)÷(Op.\d+),÷(No.\d+)÷(.+?)$**  
_Replace matches with:_ **$1÷$3÷$4,÷$2**

[\_] Case sensitive comparison

_Note: Replace one special ÷ character with one space character._

 

Input string:  
**'Etude Op.10, No.11 In E-Flat Major - Allegretto'**  
Result string:  
**'Etude No.11 In E-Flat Major - Allegretto, Op.10'**

 

DD.20090902.2252.CEST

---

<div class="post-metadata">

### Author: ![deus62](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/d9b06d/32.png) [@deus62](https://community.mp3tag.de/u/deus62)
#### Post date: [September 3, 2009, 2:57am UTC](https://community.mp3tag.de/t/swapping-text-in-title/8886/3 "2009-09-03T02:57:32Z")

</div>

> [@DetlevD](#):
>
> You may create an action using a regular expression to divide the title string into parts and put the parts together into new sequence:
> 
> _Actiontype 5:_ **Format tag field**  
> _Field:_ **TITLE**  
> _Formatstring:_ **$regexp(%title%,'^(.+?)÷(Op.\d+),÷(No.\d+)÷(.+?)$','$1÷$3÷$4,÷$2')**
> 
> ... or ...
> 
> _Actiontype 4:_ **Replace with regular expression**  
> _Field:_ **TITLE**  
> _Regular expression:_ **^(.+?)÷(Op.\d+),÷(No.\d+)÷(.+?)$**  
> _Replace matches with:_ **$1÷$3÷$4,÷$2**
> 
> [\_] Case sensitive comparison
> 
> _Note: Replace one special ÷ character with one space character._
> 
>  
> 
> Input string:  
> **'Etude Op.10, No.11 In E-Flat Major - Allegretto'**  
> Result string:  
> **'Etude No.11 In E-Flat Major - Allegretto, Op.10'**
> 
>  
> 
> DD.20090902.2252.CEST

Thank you very much! (I also needed that). 🙂  
I'll give that a try today.  
I'll also try to learn how to do this kind of stuff.  
Looks very powerful!

deus62

---

<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:21pm UTC](https://community.mp3tag.de/t/swapping-text-in-title/8886/4 "2026-02-09T12:21:45Z")

</div>


