Small help - move '(feat. XX)' from TITLE to ARTIST

Sorry, I know this type of question has been addressed in several threads, but it looks like everyone wants to do the opposite of what I want to do.

I found a code and made it work - mostly. I can't get the end parenthesis after the last artist.

Here is what I am using

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

before
Artist: Blu & Exile
Title: Maybe One Day (feat. Black Spade)
after
Artist: Blu & Exile (feat. Black Spade)
Title: Maybe One Day

Also, "feat. ARTIST" should always be surrounded by ()

before
Artist: Daft Punk
Title: Get Lucky (Daft Punk Remix) [feat. Pharrell Williams]
after
Artist: Daft Punk (feat. Pharrell Williams)
Title: Get Lucky (Daft Punk Remix)

Thanks for your help!

I haven't played with it, but one thing I see right away is that you need to escape the square brackets within your character sets.

Change

[[({<] to [[({<]

[^])}>] to [^])}>]

[])}>] to [])}>]

You don't need that. All of these brackets are placed in a way that they don't need escaping.

Just add the parenthisis in the replacement part after $2 or $3:
(feat. $2$3)+++$1',1)

Perfect! It's working well now. Thanks for the assistance.

Here's my finished solution:

Action type
Guess values
Source format
%ARTIST%$regexp(%TITLE%,'^(.+?)\s+[[({<]?\s*(?:featuring|feat.?|ft.?)\s*([^])}>]+)>\s*[])}>]?(.*)$',' (feat. $2$3)+++$1',1)
Guessing pattern
%ARTIST%+++%TITLE%

:laughing: Thanks GREAT WORK to all the ppl that made and revised this code.
(i take no credit).

Now by doing a simple switching of the code you supplied its possible to send the ... (feat. XX) info to any other field such as sending it from the ARTIST field to the TITLE field.

move '(feat. XX)' from ARTIST to TITLE

Action Type:
Guess Value

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

Guessing Pattern:
%TITLE%+++%ARTIST%

OR

move '(feat. XX)' from TITLE to ARTIST

Action Type:
Guess Value

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

Guessing Pattern:
%ARTIST%+++%TITLE%

Read there ...
Move "Featuring" from Artist to Title

DD.20131029.0904.CET