# Switching multiple first and last names

**URL:** <https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991>\
**Category:** Support\
**Created:** [August 24, 2013, 8:14pm UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991 "2013-08-24T20:14:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jolivetj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@jolivetj](https://community.mp3tag.de/u/jolivetj)\
**Post date:** [August 24, 2013, 8:14pm UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991/1 "2013-08-24T20:14:33Z")

</div>

I can succesfully switch First and Last Artist names using the following function:

$regexp(%artist%,(._?) (._),$2',' $1)

How can I modify this script to perform the same action to multiple artists separated by \\ ?

Merci

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [August 25, 2013, 1:54am UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991/2 "2013-08-25T01:54:42Z")

</div>

The easiest way is to use a Replace with regular expression action.  
It will work with the same parameters.

---

<div class="post-metadata">

**Author:** ![jolivetj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@jolivetj](https://community.mp3tag.de/u/jolivetj)\
**Post date:** [August 25, 2013, 10:19am UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991/3 "2013-08-25T10:19:18Z")

</div>

Thank you  
I need some more guidance.  
What would the text be in the 'Regular expression' and 'Replace the correspondances by' fields?  
Merci

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [August 25, 2013, 12:55pm UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991/4 "2013-08-25T12:55:22Z")

</div>

RE: (._?) (._)  
Replace with: $2, $1

---

<div class="post-metadata">

**Author:** ![jolivetj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/ecccb3/32.png) [@jolivetj](https://community.mp3tag.de/u/jolivetj)\
**Post date:** [August 25, 2013, 3:48pm UTC](https://community.mp3tag.de/t/switching-multiple-first-and-last-names/14991/5 "2013-08-25T15:48:40Z")

</div>

Perfect  
Merci

---

<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/switching-multiple-first-and-last-names/14991/6 "2026-02-09T12:24:38Z")

</div>

Closed on February 9, 2026, 12:24pm UTC


