# Switching first and last names in fields with multiple artists/soloists

**URL:** https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705
**Category:** Support
**Created:** [February 14, 2017, 9:12am UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705 "2017-02-14T09:12:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kosmonaut\_75](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/4da419/32.png) [@kosmonaut\_75](https://community.mp3tag.de/u/kosmonaut_75)
#### Post date: [February 14, 2017, 9:12am UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705/1 "2017-02-14T09:12:04Z")

</div>

Hi, I cannot find any existing thread for the following situation:

I would like to switch first and last names of the soloists in my classical music collection. For albums with only one soloist this no problem, I am using the following action:

Action: Format Value  
Field: Soloist  
String: $regexp(%soloist%,(._) (._),$2',' $1)

However, if I am using this for album with multiple soloists in the soloist field like "Rolando Villazon\\Anna Netrebko\\Bryn Terfel" this doesn't work. Only the first name is kept after executing the action, the others are deleted.

How can I switch first and last name in multiple soloists fields?

---

<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: [February 14, 2017, 9:47am UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705/2 "2017-02-14T09:47:57Z")

</div>

> [@kosmonaut\_75](#):
>
> Hi, I cannot find any existing thread for the following situation:  
> ...

What about this one: [/t/14169/1](https://community.mp3tag.de/t/14169/1)

---

<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: [February 14, 2017, 11:42am UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705/3 "2017-02-14T11:42:57Z")

</div>

> [@kosmonaut\_75](#):
>
> Hi, I cannot find any existing thread for the following situation: I would like to switch first and last names of the soloists in my classical music collection. ... for album with multiple soloists in the soloist field like "Rolando Villazon\\Anna Netrebko\\Bryn Terfel" ...

Find something useful there ...  
[Need help with regex for ARTISTSORT](https://community.mp3tag.de/t/12653/1)  
[Multiple value artist tag to multiple value artistsort](https://community.mp3tag.de/t/12599/1)  
[/t/17090/1](https://community.mp3tag.de/t/17090/1)

Try this ...

 

From: SOLOIST = 'Rolando Villazon\\Anna Netrebko\\Bryn Terfel'  
To : TEST = 'Villazon, Rolando\\Netrebko, Anna\\Terfel, Bryn'

 **TEST \<== $trimRight($regexp($meta\_sep(SOLOIST,';')';','(.+?) (.+?);','$2, $1\\\\'),'\')** 

DD.20170214.1422.CET

---

<div class="post-metadata">

### Author: ![kosmonaut\_75](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/4da419/32.png) [@kosmonaut\_75](https://community.mp3tag.de/u/kosmonaut_75)
#### Post date: [February 15, 2017, 3:55pm UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705/4 "2017-02-15T15:55:16Z")

</div>

> [@DetlevD](#):
>
> Find something useful there ...  
> [Need help with regex for ARTISTSORT](https://community.mp3tag.de/t/12653/1)  
> [Multiple value artist tag to multiple value artistsort](https://community.mp3tag.de/t/12599/1)  
> [/t/17090/1](https://community.mp3tag.de/t/17090/1)
> 
> Try this ...
> 
>  
> 
> From: SOLOIST = 'Rolando Villazon\\Anna Netrebko\\Bryn Terfel'  
> To : TEST = 'Villazon, Rolando\\Netrebko, Anna\\Terfel, Bryn'
> 
> **TEST \<== $trimRight($regexp($meta\_sep(SOLOIST,';')';','(.+?) (.+?);','$2, $1\\\\'),'\')** 
> 
> DD.20170214.1422.CET

Awesome! It worked out perfectly!! Thank you!!!

---

<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:26pm UTC](https://community.mp3tag.de/t/switching-first-and-last-names-in-fields-with-multiple-artists-soloists/18705/5 "2026-02-09T12:26:40Z")

</div>


