Help with Duplicate Text

Hello

I have been having a hard time finding information that would help me with the following problem.

I need to remove the 2nd (feat. and replace with & symbol.

Example:

Mass Of Man - Unhappy (feat. Olivia Charlotte (feat. Bingx)

to

Mass Of Man - Unhappy (feat. Olivia Charlotte & Bingx)

Additionally if there is this type of problem, I would like to remove the last 2 (feat. and replace both with & symbol.

Example:

Mass Of Man - Unhappy (feat. Olivia Charlotte (feat. Bingx (feat. Misc)

to

Mass Of Man - Unhappy (feat. Olivia Charlotte & Bingx & Misc)

A super wish would be to replace the 2nd (feat. with a comma and the 3rd (feat. with & (not sure if this would be possible)

Example:

Mass Of Man - Unhappy (feat. Olivia Charlotte (feat. Bingx (feat. Misc)

to

Mass Of Man - Unhappy (feat. Olivia Charlotte, Bingx & Misc)

Hope someone can help
Thank you very much

$regexp('Mass Of Man - Unhappy (feat. Olivia Charlotte (feat. Bingx)','(.*?feat.*?) \(feat\.(.*)',$1 &$2)
Leads to
Mass Of Man - Unhappy (feat. Olivia Charlotte & Bingx)
This also works for
Mass Of Man - Unhappy (feat. Olivia Charlotte (feat. Bingx (feat. Misc)
in a first step as it leads to
Mass Of Man - Unhappy (feat. Olivia Charlotte & Bingx (feat. Misc)
so you simply run the action twice.
To get the first & into a comma:
$regexp('Mass Of Man - Unhappy (feat. Olivia Charlotte & Bingx & Misc)','(.*?) & (.*)','$1, $2' )

Use the scripting commands in an action of the type "Format value" or Convert>Tag-Tag

Thank you very much for the quick reply and taking the time to answer my question.

Well I guess I do have a follow up question.

What if its a different band or text? Is there code to replace the 2nd (feat. "Any band" to a & symbol?
Generic code for any band?

And the same if there is two extra (feat. 1st (feat. to a comma and 2nd (feat. to a & symbol?
Generic code for any band or text?

Thanks again

No, MP3tag cannot read and does not have a word storage to compare that with the text in the fields.

The best way would be to filter for the files that need treatment.

Thanks again for your response.

You filter e.g with
%title% MATCHES "(feat.*feat"

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