Move feat to artist field

I've read through a few threads and simply cannot get the moving of the artist out of the title into the artist field. I've been working on this script for over 5hrs. Can someone please help me with this?

title: Gotta Get It Feat. Gucci Mane (Dj Organic Edit)
artist: Juvenile

I want to change it to:

title: Gotta Get It (Dj Organic Edit)
artist: Juvenile Feat. Gucci Mane

You could split the title field into several fields, perhaps user-defined ones.
And then you reassemble the fields as you prefer it.
If you do not like that idea, then please show us, what you have done so far and where you got stuck.

here is my script. after it runs, it changes to:

title: Gotta Get It (Dj Organic Edit)
artist: Juvenile

  1. Extract featured artist to temporary field
    Action type: Format value
    Field: _TMP_FEAT
    Format string: $regexp(%title%,.*(?i)(feat\.|ft\.)\s+([^()]+).*,$2)

  2. Append featured artist to ARTIST
    Action type: Format value
    Field: ARTIST
    Format string: $if(%_TMP_FEAT%,%artist% Ft. %_TMP_FEAT%,%artist%)

  3. Clean the TITLE (remove feat part only)
    Action type: Format value
    Field: TITLE
    Format string: $regexp(%title%,\s+(?i)(feat\.|ft\.)\s+[^()]+, )

  4. Remove temporary field
    Action type: Remove fields
    Field: _TMP_FEAT

What is the result of each action?
In a good test environment, you would test each action separately to make sure that the result is as expected.

i did not know you could break it down. i'll run each action separately.

i ran the first par tof the script and did an Alt T and see there is an issue: it has this error msg

REGEXP ERROR: Regular expression

Invalid preceding regular expression prior to repetition operator. The error occurred while parsing the regular expression fragment: 'ft.)\s+(+>>>HERE>>>).*'.

You can test regular expressions in the Converter>Tag-Tag with its preview.

i did the preview and it's throwing the same REGEX ERROR MSG. the preview helps but still no closer to the solution. for some reason my script is having a hard time going from:

title: Gotta Get It Feat. Gucci Mane (Dj Organic Edit)
artist: Juvenile

I want to change it to:

title: Gotta Get It (Dj Organic Edit)
artist: Juvenile Feat. Gucci Mane

here is the error in the preview:

H:_ Single, Remixes, Edits Collection\Hip Hop\222\J\Juvenile\Gotta Get It Feat. Gucci Mane (Dj Organic Edit) 106 - Juvenile.mp3
"REGEXP ERROR: Regular expression

Invalid preceding regular expression prior to repetition operator. The error occurred while parsing the regular expression fragment: 'eat.\s+(+>>>HERE>>>).*'." ->
"REGEXP ERROR: Regular expression

Invalid preceding regular expression prior to repetition operator. The error occurred while parsing the regular expression fragment: 'eat.\s+(+>>>HERE>>>).*'."

Could you explain, what each part of the regular expression does?

  1. .*
  2. (?i)
  3. (feat\.|ft\.)
  4. \s+
  5. [[^()]+)
  6. .*
  7. and what does $2 refer to?

its just something I was trying but failing miserable at. do you know of a simple way to achieve what i'm trying to do? Im open to ideas?

title: Gotta Get It Feat. Gucci Mane (Dj Organic Edit)
artist: Juvenile

I want to change it to:

title: Gotta Get It (Dj Organic Edit)
artist: Juvenile Feat. Gucci Mane

Honestly, why do you use a function that is a black box to you?

I would use just a single action (and not 4): "Guess value"
Source string: %artist% Feat. $regexp(%title%,'(.*) Feat. (.*?) (\(.*\))',$2==$1 $3)
Target format string: %artist%==%title%

FIRST please allow me to THANK YOU for providing the solution. It worked!! Yah finally after 6+hrs of trying

and to answer your question, I thought I would put more time in learning how to script in mp3 actions instead of just always asking first. I've learned a thing or two but still have a far way to go to get better results. In short, I'm learning by making a lot of mistakes but I'm trying my friend :slight_smile:

A good approach would be to decipher the applyed regular expression before it gets activated.

how so? please share with me a good practical clean approach? im still learning regex but what do you recommend?

Research the parts of the (apparently found) regular expression as suggested here:

Perhaps with the help of this page: