# Shifting any word based on dividers. Is it possible?

**URL:** https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702
**Category:** Export
**Created:** [February 12, 2017, 3:18pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702 "2017-02-12T15:18:33Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 12, 2017, 3:18pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/1 "2017-02-12T15:18:33Z")

</div>

Have finally got clean mp3s after my yesterdays attempt to find solution, which the generous member here helped me get.

now I have mp3s in this format mainly,

**01 - Artist 1 - Title (Original Mix) (feat. Artist 2).mp3**

thats the case in all the files.

As you can see there are 2 dividers.

I would want to achieve all the mp3s like this please.

**01 - Artist 1 feat. Artist 2 - Title (Original Mix).mp3**

\*the feat. artist is always inside ( & ).  
\*the feat. is always **feat.**  
\*Format of tracks is TrackNumber Space Divider Space Artist1 Space Divider Space TitleOfTrack  
\*Its not necessary that **(feat. XXXX)** is at the end of filename. It can be anywhere in between also.

Can it be achieved?

Thanks for reading.

Best regards,

---

<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: [February 12, 2017, 3:31pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/2 "2017-02-12T15:31:44Z")

</div>

> [@vvikkass](#):
>
> ...now I have mp3s in this format mainly,
> 
> **01 - Artist 1 - Title (Original Mix) (feat. Artist 2).mp3**  
> thats the case in all the files.  
> ...

Why do you fiddle about with the filenames?  
Transfer the data to the tags first and then see e.g. this thread:  
[/t/11096/1](https://community.mp3tag.de/t/11096/1)  
It deals with a lot of occurances of featuring artists.

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 12, 2017, 4:19pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/3 "2017-02-12T16:19:25Z")

</div>

> [@ohrenkino](#):
>
> Why do you fiddle about with the filenames?  
> Transfer the data to the tags first and then see e.g. this thread:  
> [/t/11096/1](https://community.mp3tag.de/t/11096/1)  
> It deals with a lot of occurances of featuring artists.

Thanks. I read it. But I dont know what regex to use in my case.

---

<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: [February 12, 2017, 4:46pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/4 "2017-02-12T16:46:34Z")

</div>

> [@vvikkass](#):
>
> Thanks. I read it. But I dont know what regex to use in my case.

Have you transferred the data to tags?

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 12, 2017, 5:04pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/5 "2017-02-12T17:04:02Z")

</div>

> [@ohrenkino](#):
>
> Have you transferred the data to tags?

Yes original tags looks like this,  
Artist: Mark Jous  
Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)

REGEX I am using is : $regexp(%artist%,$1,1) $mid(%title%,$strstr($lower(%title%),feat.),999) - $regexp(%title%,$1,1)

After result,  
Artist: Mark Jous feat. Eufonic)  
Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)

Desired,  
Artist: Mark Jous feat. Eufonic  
Title: Sandra (Courage & Evenfall Remix)

---

<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: [February 12, 2017, 5:08pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/6 "2017-02-12T17:08:36Z")

</div>

> [@vvikkass](#):
>
> Yes original tags looks like this,  
> Artist: Mark Jous  
> Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)  
> ...

The regexp look overly complicated to me.  
Check out the possibilities of a helper fields and guess value actions:  
[Move "Featuring" from Artist to Title](https://community.mp3tag.de/t/11096/89)

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 12, 2017, 5:13pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/7 "2017-02-12T17:13:31Z")

</div>

> [@ohrenkino](#):
>
> The regexp look overly complicated to me.  
> Check out the possibilities of a helper fields and guess value actions:  
> [Move "Featuring" from Artist to Title](https://community.mp3tag.de/t/11096/89)

I couldnt get what this link says.

Regex I tried my best to arrange in this order. Sorry not that into technicality sire. Please suggest a solution as per my case.

EDIT :-

$regexp(%artist%,(._),$1) $mid(%title%,$strstr($lower(%title%),feat.),999) - $regexp(%title%,(._) ((.\*)),$1,1)

Worked.

Now the new tags are fine.

Earlier :  
Artist : Mark Jous  
Title : Sandra (feat. Eufonic)

Now after the regex it looks like,  
Artist : Mark Jous feat. Eufonic)  
Title : Sandra

Now I need to know the way to remove parenthesis after Eufonic that I am getting. Dont know how to remove that. What to add in the regex above?

---

<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: [February 12, 2017, 5:29pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/8 "2017-02-12T17:29:45Z")

</div>

> [@vvikkass](#):
>
> Yes original tags looks like this,  
> Artist: Mark Jous  
> Title: Sandra (Courage & Evenfall Remix) (feat. Eufonic)  
> ...
> 
> Desired,  
> Artist: Mark Jous feat. Eufonic  
> Title: Sandra (Courage & Evenfall Remix)

Create an action of the type "Guess value" for %title%  
Guessing pattern: %title% (feat. %featartist%)

Create an action of the type "Format value" for ARTIST  
Format string: %artist% feat. %featartist%

Delete user-defined field FEATARTIST

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 13, 2017, 2:09am UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/9 "2017-02-13T02:09:47Z")

</div>

> [@ohrenkino](#):
>
> Create an action of the type "Guess value" for %title%  
> Guessing pattern: %title% (feat. %featartist%)
> 
> Create an action of the type "Format value" for ARTIST  
> Format string: %artist% feat. %featartist%
> 
> Delete user-defined field FEATARTIST

GUESS code just adds **(feat.)** at the end of title. What am i doing wrong?

---

<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: [February 13, 2017, 5:44am UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/10 "2017-02-13T05:44:18Z")

</div>

> [@vvikkass](#):
>
> GUESS code just adds **(feat.)** at the end of title. What am i doing wrong?

I don't know.  
Perhaps spelling, case?  
It works with the given example.

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 17, 2017, 5:44pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/11 "2017-02-17T17:44:47Z")

</div>

> [@ohrenkino](#):
>
> I don't know.  
> Perhaps spelling, case?  
> It works with the given example.

Sorry for the late reply.

It worked!!

How to do with these kind of examples?

ARTIST = Dirtcaps  
TRACK = Foreign Tongues (feat. Eleni Drake) (Acoustic Version)

DESIRED  
ARTIST = Dirtcaps feat. Eleni Drake  
TITLE = Foreign Tongues (Acoustic Version)

Thanks and best regards,  
🙂

---

<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: [February 17, 2017, 5:55pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/12 "2017-02-17T17:55:30Z")

</div>

> [@vvikkass](#):
>
> ...  
> ARTIST = Dirtcaps  
> TRACK = Foreign Tongues (feat. Eleni Drake) (Acoustic Version)
> 
> DESIRED  
> ARTIST = Dirtcaps feat. Eleni Drake  
> TITLE = Foreign Tongues (Acoustic Version)  
> ..

I would use an action of the type "Replace with regular expression" for TITLE  
Search string: (._) (feat. (._) ((.\*))  
Replace string: $1 $3 (feat. $3

Which should lead to

TRACK = Foreign Tongues (Acoustic Version) (feat. Eleni Drake)

and then the already working "Guess value" action.

---

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [February 19, 2017, 4:02pm UTC](https://community.mp3tag.de/t/shifting-any-word-based-on-dividers-is-it-possible/18702/13 "2017-02-19T16:02:20Z")

</div>

> [@ohrenkino](#):
>
> I would use an action of the type "Replace with regular expression" for TITLE  
> Search string: (._) (feat. (._) ((.\*))  
> Replace string: $1 $3 (feat. $3
> 
> Which should lead to
> 
> TRACK = Foreign Tongues (Acoustic Version) (feat. Eleni Drake)
> 
> and then the already working "Guess value" action.

got the result after doing,  
$1 $3 (feat. $2

Thanks a lot 🙂
