Copy/Move Featured Artist From Title to Artist

Considering Title like
Girlfriend (feat. Nelly) (remix)

and Artist like
*NSYNC

Can anyone help me with a set of actions which....

  1. Extract Featured Artist based on logic

([0,1] (optional open bracket)
feat.|feat|featuring
[0,1] (optional space)
Artist
terminated by ) or End of line whichever is first

  1. Add extracted artist to end of Artist with ; separator
    ie Artist becomes
    *NSYNC;Nelly

  2. Remove feature and artist wording from title up to and including any immediate () and any double spaces as a consequence.
    ie title becomes
    Girlfriend (remix)

Thanks for help

See thisx post on the "feature" stuff
/t/11096/1

and then see what is left of your problems.

Here is a proposal, which needs two actions of type "Format value" ...

ARTIST = '*NSYNC' TITLE = 'Girlfriend (feat. Nelly) (remix)' ARTIST <== %ARTIST%';'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft\.?|feat\.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1) ARTIST = '*NSYNC;Nelly' TITLE <== $regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft\.?|feat\.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$1$3',1) TITLE = 'Girlfriend (remix)'

DD.20151212.2303.CET

Thanks for the pointer to the guess values post...that made some sense.

Thanks for the specific commands because i was struggling to follow.

The above code has worked perfectly for the brief..
and surpassed it, (works with featured artists in other bracket types)
works with other common featured artist terminators (eg. open brackets) when more 'non featured artist' info follows .

I used a simple replace action afterwards to clean '&|and|,' etc
where there were multiple featured artists.

there were a few 'unhandled' instances.

Title=Turn This Love Around Feat. Laura V. - Toby Hedges Remix
perhaps '. -' could be a terminator of artist

Title=Anakin Defeats Sebulba
this is as much the fault of my F3 filter, seems 'feat.' matches defeats...I should have used 'feat.' in my filter.
dont know if an action could have ignored (rather than adding entire title as artist)

Title=Afternoon Delight (Glee Cast Version) ( feat. John Stamos )
logic might have been improved by allowing space after '(' before 'feat' match.
' )' with a space worked fine at end though.

Title=Somebody To Love Me (feat. Boy George & Andrew Wyatt)
Did not work, artist truncated after 'Andrew '
but i cant tell why.

Title=North Point(feat. Anita Hegerland)
Did not work, maybe a space before opening optional '('
doesnt need to be required.

Thanks Again.

Note:
$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

... does not match ...
Title=Anakin Defeats Sebulba

... but does match ...
Title=Turn This Love Around Feat. Laura V. - Toby Hedges Remix
Therefore the match result of this special example string needs further cleaning ...
or this sort of title string needs a different regexp.

A "don't match" case can be detected by comparing of the input string and the output string, because both strings are identical.

Some string like this ... '( feat. John Stamos )'
... can be cleaned up by a replace function ...

$replace(%TITLE%,'( ','(',' )',')') ==> '(feat. John Stamos)'

... or by a regexp function ...

$regexp('( feat. John Stamos )','(\()\s*|\s*(\))','$1$2') ==> '(feat. John Stamos)'

Please check again, it does work fine ...
"Somebody To Love Me (feat. Boy George & Andrew Wyatt)" -> "Boy George & Andrew Wyatt"

Slightly changed regexp should match this case of missing space before the open round bracket...

$regexp(%TITLE%,'^(.+?)\s*[[({]?\s*(?:ft\.?|feat\.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

"North Point(feat. Anita Hegerland)" -> "Anita Hegerland"

You can avoid the special rework, if you format the input data in a previous step to be conform with the expected regexp input format.

DD.20151213.1414.CET

thanks again,

i will try the suggestions.