Action Definition Question replace first comma with feat

This is going to sound like a weird one, but I'm not sure how to fix this one.

I have an action that I use both in Mac and Windows versions called,

'Comma replace with feat.'

What is does is find a comma followed by a space and replaces it with feat.

It works but it replaces all instances of this.

So I have to manually go and replace second and third instances with ,

I'm trying to emulate the function from from my old tagger because it would only replace the first found instance in every filename and tag and leave the rest.

I'm not sure how it did it but it would leave the rest alone unless I ran find/replace again, and so on.

Is there a way I could make it ignore the rest and just replace the first instance found?

These are the current rules,


Try something like
$regexp('Earth, Wind, Fire','(.*?), (.*)',$1 feat. $2)

You would have to take care that it really makes sense to replace the comma with "feat."
In my example, the original name would be "Earth, Wind & Fire" and even "Earth feat. Wind & Fire" would not be correct.
There are some more examples:
Bell, Book & Candle
Emerson, Lake & Palmer
Dave Dee, Dozy, Beaky, Mick & Titch
Blood, Sweat & Tears
Crosby, Stills, Nash & Young
Choir of the New Church, Oxford
Daniel Barenboim; Orchestre de Paris; Michel Debost
Eins, Zwo
Ellis, Beggs & Howard
I Will, I Swear
Pretentious, Moi?
Robbi, Tobbi und das Fliewatüüt
Stock, Aitken & Waterman
Up, Bustle & Out

Yes agreed, but the tracks I work with aren't setup in that way.

That's why I can do a mass replace and it worked in the past.

Does my suggestion work?

1 Like

I haven't tried it yet,

But keep in mind with the rules I'm using. It does replace the , with feat.

However, it replaces all of them. So I'm not sure if you can stop it from replacing all of them it finds.

Please note that you either have to use an action of the type "Replace with regular expression" and
Search string: (.*?), (.*)
Replace string: $1 feat. $2

or an action of the type "Format tag field" for ARTIST
Format string: $regexp(%artist%,'(.*?), (.*)',$1 feat. $2)

I cannot reproduce your claim that a simple replace only replaces the first occurrance of a string.

I will investigate it further. Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.