# How can I swap text before and after a character? (see example)

**URL:** https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590
**Category:** Support
**Created:** [June 26, 2010, 2:40am UTC](https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590 "2010-06-26T02:40:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![scottyb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@scottyb](https://community.mp3tag.de/u/scottyb)
#### Post date: [June 26, 2010, 2:40am UTC](https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590/1 "2010-06-26T02:40:49Z")

</div>

Hi guys

On a bunch of sermon mp3s (that were already tagged when I got em), I want to swap text before and after a character:

**Original titles:**  
God's Intent for Marriage Part 1 = Matthew 19'3-6  
God's Intent for Marriage Part 2 = Matthew 19'3-6  
God's View of Divorce Part 1 = Matthew 19'7-9  
God's View of Divorce Part 2 = Matthew 19'7-9

**How I want them to look:**  
Matthew 19'3-6 - God's Intent for Marriage Part 1  
Matthew 19'3-6 - God's Intent for Marriage Part 2  
Matthew 19'7-9 - God's View of Divorce Part 1  
Matthew 19'7-9 - God's View of Divorce Part 2

Is there an action I can create to swap/shift text like this after a certain character?  
(in this case the = symbol)

Thanks in Advance

---

<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: [June 26, 2010, 7:57am UTC](https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590/2 "2010-06-26T07:57:39Z")

</div>

> [@scottyb](#):
>
> ... I want to swap text before and after a character:  
> **Original titles:**  
> God's Intent for Marriage Part 1 = Matthew 19'3-6  
> ...  
> **How I want them to look:**  
> Matthew 19'3-6 - God's Intent for Marriage Part 1  
> ...  
> Is there an action I can create to swap/shift text like this after a certain character?  
> (in this case the = symbol) ...

If you have read through the forum, you would have find many hits regarding the question "How to swap ... " and there are many proposals how to do it, for example ...

Action "Format value" along with the $regexp() function:  
Tag field: TITLE  
Format string: $regexp(%TITLE%,'^(.+?) = (.+?)$','$2 - $1')

DD.20100626.1159.CEST

---

<div class="post-metadata">

### Author: ![scottyb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@scottyb](https://community.mp3tag.de/u/scottyb)
#### Post date: [June 26, 2010, 6:51pm UTC](https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590/3 "2010-06-26T18:51:31Z")

</div>

Action "Format value" along with the $regexp() function:  
Tag field: TITLE  
Format string: $regexp(%TITLE%,'^(.+?) = (.+?)$','$2 - $1')

**Thanks DetlevD... you are always helpful. 🙂**

---

<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:22pm UTC](https://community.mp3tag.de/t/how-can-i-swap-text-before-and-after-a-character-see-example/10590/4 "2026-02-09T12:22:28Z")

</div>


