Switching multiple first and last names

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 \\ ?


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

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

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