Taking what I've learned here and elsewhere, I've not got the following 5 actions to choose from when renaming Artists in this fashion; perhaps compiling them here may help others. (*Most of mine are set up as format field with the $regexp function but I tried to standardize them in describing them):
From "First Name(s) Last Name(s)" to "Last Name(s), First Name(s)" Format:- Transform Artist from "A B" to "B, A" or "A B C" to "C, A B"
ex: "John Smith" to "Smith, John" or "John Michael Smith" to "Smith, John Michael"Regular Expression Replace:
(.*) (.*)with:$2, $1
- Transform Artist from "A B C" to "B C, A"
ex: "John Smith Jones" to "Smith Jones, John"Regular Expression Replace:
(.*?) (.*)with:$2, $1
- Transform Artist from "A B ©" to "B, A ©"
where "©" is any suffix you like following a two word nameFrom "Last Name(s), First Name(s)" to "First Name(s) Last Name(s)" Format:Regular Expression Replace:
(.*?) (.*) (.*)with:$2, $1 $3
4] Transform Artist from "B, A" to "A B" or "B, A ©" to "A B ©"
ex: "Smith, John" to "John, Smith" or "Joel, Billy & Elton John" to "Billy Joel & Elton John"Regular Expression Replace:
^([\w]+),\s([\w]+)with:$2 $1I find this works well with all two-word names no matter if you've added more stuff to the end and it is safe to run on all artist who DON'T have comma's in their name field too; except for those who have more than two words in their proper name.
5] Transform Artist from "B C, A" to "A B C" or "C, A B" to "A B C"
ex: "Smith Jones, John" to "John Smith Jones" or "Smith, John Michael" to "John Michael Smith"Regular Expression Replace:
(.*)',' (.*)with:$2 $1This simply takes everything before the comma and puts it at the end, which works great for all names, no matter how many words in the first or last, but doesn't play nice with non-name suffixes you may have added (like "Joel, Billy and Elton John").
Adding or Removing Leading "The "
6] Restore Leading "The " to Artists' Names
7] Delete Leading "The " and "A " from Artists' Names
Artist_Name_Actions.zip (1.77 KB)