Switches first and last names
Thank you!
I developed it a little.
Variant A
It will not change those artists, where the conversion already done (artist has comma).
Example: Brel, Jacques William remains Brel, Jacques William
Action: regular expression
Field: ARTIST
Regular expression: ^([^,]+)\s([^,]+)$
Replace with: $2, $1
Variant B
It handles multipled for WMP artists (in format "artist1/artist2/artist3"), possible nicknames at the end in square brackets and trims unnecessary white spaces.
Example:
Elvis Presley /Brel, Jacques/ Gabriele Susanne Kerner [Nena ]
will
Presley, Elvis/Brel, Jacques/Kerner, Gabriele Susanne [Nena]
Action group
-
action: regular expression (trim white spaces)
Field:ARTIST
Regular expression:^\s+|\s+$
Replace with: (nothing) -
action: regular expression (multiple white spaces replace to 1)
Field:ARTIST
Regular expression:\s{2,}
Replace with:" "
(whitout quotation marks) -
action: replace (delete white space after opening bracket)
Field:ARTIST
Original:"[ "
(whitout quotation marks)
Replace with:[
-
action: replace (delete white space before closing bracket)
Field:ARTIST
Original:" ]"
(whitout quotation marks)
Replace with:]
-
action: split fields by separator (for the next actions)
Field:ARTIST
Separator:/
-
action: regular expression (switches names without nickname)
Field:ARTIST
Regular expression:^([^,[]+)\s([^,[]+)$
Replace with:$2, $1
-
action: regular expression (switches names with nickname)
Field:ARTIST
Regular expression:^([^,[]+)\s([^,[]+)\s(\[.+\])$
Replace with:$2, $1 $3
-
action: merge duplicate fields (...back)
Field:ARTIST
Separator:/