How to batch replace the last comma with ampersand (&) character.

In artist tag, I want to batch replace the last comma with ampersand (&) character.

e.g.

if artist tag is "Artist A, Artist B, Artist C"

result should be "Artist A, Artist B & Artist C".

and if "Artist A, Artist B"

result should be "Artist A & Artist B".

How to do it by action?

May I get the regular expression replace syntax for the same.

Thanks...

Use an action of the type "Replace with regular expression" for ARTIST
Search string: (.*), (.*)
Replace string: $1 & $2

Due to the greediness of the expression, only the last comma is replaced. Should work with any Artist that has comma in the name.

Will produce problems for artists that already have an ampersand in the name like "Emerson, Lake & Palmer", "Earth, Wind & Fire", "Bell, Book & Candle".

Thank you....so muchh......

Got the exactly what I was looking for.. :book: :book:

:music: :music: :music:

It seems that the problem would be with the last artist having a comma in its name.

IN: "Emerson, Lake & Palmer", "Earth, Wind & Fire", "Bell, Book & Candle"

OUT: "Emerson, Lake & Palmer", "Earth, Wind & Fire", "Bell & Book & Candle".</b>Usually the commas between the quotes would be represented by semicolons, especially if the artists are unquoted.
QUOTE (Rijkstra @ Mar 8 2016, 17:45) <{POST_SNAPBACK}>
It seems that the problem would be with the last artist having a comma in its name.

IN"[/font]Emerson, Lake & Palmer", "Earth, Wind & Fire", "Bell, Book & Candle"

OUT: "Emerson, Lake & Palmer", "Earth, Wind & Fire", "Bell & Book & Candle".</b>Usually the commas between the quotes would be represented by semicolons, especially if the artists are unquoted.<!--QuoteEnd--></div><!--QuoteEEnd-->

You do realize that the data in quotes actually represents individual groups and will probably never be part of a single artist field.
So the "out" would look much more like this:
Emerson & Lake & Palmer
Earth & Wind & Fire
Bell & Book & Candle

Oh, I just remembered one of my all-time favourites:
Dave Dee, Dozy, Beaky, Mick & Tich
would turn to, if you replace the "last" comma with an ampersand
Dave Dee, Dozy, Beaky & Mick & Tich

I intended my excursion to these groups as a word of caution that the criterion "last comma" is not always valid and that you have to filter your data first to get the best results.

No, not in an artist field, but I have seen garbage like that in a comment field. BTW, the example wasn't mine.