# Copy/Move Featured Artist From Title to Artist

**URL:** https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452
**Category:** Support
**Created:** [December 12, 2015, 5:35pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452 "2015-12-12T17:35:56Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ginjaninja](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@ginjaninja](https://community.mp3tag.de/u/ginjaninja)
#### Post date: [December 12, 2015, 5:35pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/1 "2015-12-12T17:35:56Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 12, 2015, 6:57pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/2 "2015-12-12T18:57:31Z")

</div>

See thisx post on the "feature" stuff  
[/t/11096/1](https://community.mp3tag.de/t/11096/1)

and then see what is left of your problems.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 12, 2015, 9:03pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/3 "2015-12-12T21:03:07Z")

</div>

> [@ginjaninja](#):
>
> ... Can anyone help me with a set of actions ...

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

---

<div class="post-metadata">

### Author: ![ginjaninja](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@ginjaninja](https://community.mp3tag.de/u/ginjaninja)
#### Post date: [December 13, 2015, 10:48am UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/4 "2015-12-13T10:48:55Z")

</div>

> [@DetlevD](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 13, 2015, 11:06am UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/5 "2015-12-13T11:06:47Z")

</div>

> [@ginjaninja](#):
>
> ... there were a few 'unhandled' instances ...

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)'**

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

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

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

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

---

<div class="post-metadata">

### Author: ![ginjaninja](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ed8c4c/32.png) [@ginjaninja](https://community.mp3tag.de/u/ginjaninja)
#### Post date: [December 15, 2015, 5:22pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/6 "2015-12-15T17:22:11Z")

</div>

thanks again,

i will try the suggestions.

---

<div class="post-metadata">

### Author: ![djrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@djrip](https://community.mp3tag.de/u/djrip)
#### Post date: [January 31, 2024, 5:54am UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/7 "2024-01-31T05:54:58Z")

</div>

This is cool! Your talent and or wasted hours has saved me many wasted hours selecting just the right amount of text, copying, pasting, modifying my pasting and then cleaning up my tag. You're awesome!

---

<div class="post-metadata">

### Author: ![djrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@djrip](https://community.mp3tag.de/u/djrip)
#### Post date: [June 19, 2024, 6:27pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/8 "2024-06-19T18:27:14Z")

</div>

OK, so I've lost my code and lost my way. I have the test data as follows.

Mrs. X QWERTY Was ft. XYZZY (Remix)  
Mrs. X QWERTY Was (ft. XYZZY) (Remix)  
Mrs. X QWERTY Was (f. XYZZY) (Remix)  
Mrs. X QWERTY Was (feat. XYZZY) (Remix)  
Mrs. X QWERTY Was (ft XYZZY) (Remix)  
Mrs. X QWERTY Was (feat XYZZY) (Remix)  
Mrs. X QWERTY Was (featuring XYZZY) (Remix)

The code :  
`^(.*?)\s*((?:\b|^)(?:f(?:eat(?:uring)?)?\.?|[fF]t\.?) [A-Z]+\b)\s*(.*?)$`  
separates the text into:  
$1="Mrs. X QWERTY Was"  
$2' any variation of "ft. XYZZY"  
$3 is any text (if any) after the $2

My desire is to have:  
Artist = Artist $2  
Title = $1 $2

I used to have it on my old computer but lost the code and can't find the correct thread.

I am still looking, but i've been trying to work it out for the last 6 hours.

Thanks again

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 19, 2024, 6:59pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/9 "2024-06-19T18:59:25Z")

</div>

You could try:  
An Action of the type "Guess value"  
Source: `$regexp($replace(%title%,featuring,ft.,feat.,ft., (Remix),,'(',,')',),(.*) (ft.*),%artist% $2==$1 $2)`  
Target format string: %artist%==%title%

Please try this on a sample file first.

---

<div class="post-metadata">

### Author: ![djrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/3ab097/32.png) [@djrip](https://community.mp3tag.de/u/djrip)
#### Post date: [June 19, 2024, 7:06pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/10 "2024-06-19T19:06:27Z")

</div>

I think I worked it out...

GUESS VALUE:  
Source Format:  
`%ARTIST%$regexp(%TITLE%,'^(.*?)\s*((?:\b|^)(?:f(?:eat(?:uring)?)?\.?|[fF]t\.?) [A-Z]+\b)\s*(.*?)$',' $2+++$1$3',1)`  
Guessing Pattern:  
`%ARTIST%+++%TITLE%`

I also had to add a Replace ' () ' to a single space

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [July 19, 2024, 7:07pm UTC](https://community.mp3tag.de/t/copy-move-featured-artist-from-title-to-artist/17452/11 "2024-07-19T19:07:14Z")

</div>

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