Regular Expression searching left to right help

I have some songs with Artists with multiple commas (supporting artists).

I am looking for conditional comparison and replacing.

So my artist name would be like:

Artist Name, sub-artist1, sub-artist2, subtist-xxx......

I've been manually replacing the first "," with FEAT. and then use an action with regular expression to replace "," with "&".

I want it to look like:

Artist Name FEAT. sub-artist1 & sub-artist2 & subtist-xxx......

So I can't sort out how to only find the first "," replace it to FEAT. and then scan the rest of the artist to replace all subsequent "," to "&"

I know I can combine two actions together, but the logic to only search for the first iteration of the "," I can't seem to figure out.

Anyone have some thoughts on how to approach this?

Thank you.
Chris

Example:

$regexp($regexp('Artist Name, sub-artist1, sub-artist2, sub-artist3',', ',' & '),'^([^&]+) &','$1 FEAT.') ==> "Artist Name FEAT. sub-artist1 & sub-artist2 & sub-artist3"

DD.20171001.1924.CEST

ARTIST <== $regexp($regexp(%ARTIST%,', ',' & '),'^([^&]+) &','$1 FEAT.') ... or ... ARTIST <== $regexp($replace(%ARTIST%,', ',' & '),'^([^&]+) &','$1 FEAT.')

DD.20171002.0753.CEST

Hi Dave,

I tried it as a format value in the %artist% field, didn't do what I was expecting. I've attached a screenshot for clarity. I think I didn't provide all the info correctly and I apologize for that.

So with the attached screen shot, the arrows show the two different scenarios I have.

So track #3 I would like to end up with:

HAILEE STEINFELD FEAT. ALESSO & FLORIDA GEORGIA LINE & WATT

and for track #7

MATY NOYES FEAT. TESTME

I see what your example does, I "think" it required the action format value in the %artist% field. If I was incorrect, is there something I should do differently?

Thanks again for all your help.

Chris


? ? ?

For now ... the given proposal does what you have wanted by your request.
You may apply the given formatstring within the action "Format value" or within the converter "Tag-Tag", the converter offers a preview.
Please define the new problem in other words and give a proper example of a possible failure.

DD.20171002.0747.CEST

Here is a coding variation of the first proposal ...

ARTIST <== 'HAILEE STEINFELD, ALESSO, FLORIDA GEORGIA LINE, WATT' ARTIST <== $replace($regexp(%ARTIST%,'^([^,]+),','$1 FEAT.'),', ',' & ') ARTIST ==> 'HAILEE STEINFELD FEAT. ALESSO & FLORIDA GEORGIA LINE & WATT' ARTIST <== 'MATY NOYES, TESTME' ARTIST <== $replace($regexp(%ARTIST%,'^([^,]+),','$1 FEAT.'),', ',' & ') ARTIST ==> 'MATY NOYES FEAT. TESTME'

DD.20171002.1000.CEST

I recall reading someone saying Dave and I "thought" you responded to that name, I of course, could be very wrong with my assumption or poor memory recall, and I guess it just stuck.....I apologize if I called you by an incorrect name.

I ended up realizing what I was doing wrong with your first post method.

I stuck %artist% in the format field chooser instead of ARTIST.

When I used:

$regexp($regexp(%ARTIST%,', ',' & '),'^([^&]+) &','$1 FEAT.')

which was taken from your first post, it worked exactly as it should.

Thank you again for your help.

Best,
Chris