# Conditional Regex to Move parts of tag between Title and Artist

**URL:** https://community.mp3tag.de/t/conditional-regex-to-move-parts-of-tag-between-title-and-artist/16892
**Category:** Support
**Created:** [May 7, 2015, 6:14pm UTC](https://community.mp3tag.de/t/conditional-regex-to-move-parts-of-tag-between-title-and-artist/16892 "2015-05-07T18:14:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sparkyumr98](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@sparkyumr98](https://community.mp3tag.de/u/sparkyumr98)
#### Post date: [May 7, 2015, 6:14pm UTC](https://community.mp3tag.de/t/conditional-regex-to-move-parts-of-tag-between-title-and-artist/16892/1 "2015-05-07T18:14:31Z")

</div>

I've been trying to make this work with regex for a few months now, and I cannot figure out my problem. I have several hundred folders to perform MP3 tag updates on, and more automation is critical for me to keep from burning out and getting sick of working with them.

I have a list of mp3s like this:

01 Rico Bernasconi - Girls Feat. Akon (Jordy Remix).mp3

02 Carl Parker, Ione Mai - I Feel Passion (Original Mix).mp3  
06 Enzo Saccone - Pa Pa Peo Feat. Dahlia (Enzo Saccone Tribal Progressive).mp3  
08 Jack Mazzoni, BSharry, Christopher Vitale - Think About the Way (feat. Carmen Nophra) (Jack Mazzoni VS Christopher Vitale Remix).mp3

 

I convert filenames to tags (%TRACK% %ARTIST% - %TITLE%), to get this:

  

01 | Rico Bernasconi | Girls Feat. Akon (Jordy Remix)  
02 | Carl Parker, Ione Mai | I Feel Passion (Original Mix)  
06 | Enzo Saccone | Pa Pa Peo Feat. Dahlia (Enzo Saccone Tribal Progressive)  
08 | Jack Mazzoni, BSharry, Christopher Vitale | Think About the Way (feat. Carmen Nophra) (Jack Mazzoni VS Christopher Vitale Remix)

 

My preferred method is to have any featured artists included in the Artist tag. I can't just look for a parenthesis (like track 8) because it would grab the Remix info from 1, 2, and 6, and ignore the Feat. on track 1.

 

So--I need something that will trigger on the word "[Ff]eat.?" (either case, . optional), and then capture anything following that, until it got to a (, {, or [ that would signify a new capture area.

 

examples:

 

> Rico Bernasconi | Girls Feat. Akon (Jordy Remix) becomes Rico Bernasconi Feat. Akon | Girls (Jordy Remix)

and

> Jack Mazzoni, BSharry, Christopher Vitale | Think About the Way (feat. Carmen Nophra) (Jack Mazzoni VS Christopher Vitale Remix) becomes Jack Mazzoni, BSharry, Christopher Vitale feat. Carmen Nophra | Think About the Way (Jack Mazzoni VS Christopher Vitale Remix)

 

A key part of this is a semi-intelligent matching to "know" if "feat" is included, and move that chunk over iff it exists... and to ignore it otherwise.

 

This is a sample of some code I've tried. It doesn't work.

 

```
$if($neql($regexp(%TITLE%,^.+?\((?:[Ff]t.+?|[Ff]eat.+?|[Ff]eaturing.+?)\)\s*\(.+?\)$),%TITLE%),%ARTIST%' feat. '$regexp(%TITLE%,^(.+?)\s+[[({<]?(ft\.?|feat\.?|featuring)\s+(.+?)[])}>]?\s*(\(.+?\))\s*$,$2,1),%ARTIST%)

```

 

Help me, regex gurus... you're my only hope!

---

<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: [May 8, 2015, 2:45am UTC](https://community.mp3tag.de/t/conditional-regex-to-move-parts-of-tag-between-title-and-artist/16892/2 "2015-05-08T02:45:16Z")

</div>

> [@sparkyumr98](#):
>
> ... My preferred method is to have any featured artists included in the Artist tag. ...

Read there ...  
[Video Edit Radio Version in Klammern löschen](https://community.mp3tag.de/t/15209/12)  
[" (feat.) " problem](https://community.mp3tag.de/t/14277/2)  
[Move "Featuring" from Artist to Title](https://community.mp3tag.de/t/11096/1)

**Move "feat xxx" from TITLE to ARTIST From A: Jack Mazzoni, BSharry, Christopher Vitale T: Think About the Way (feat. Carmen Nophra) (Jack Mazzoni VS Christopher Vitale Remix) To A: Jack Mazzoni, BSharry, Christopher Vitale feat. Carmen Nophra (Jack Mazzoni VS Christopher Vitale Remix) T: Think About the Way Action: Guess values Source format: %ARTIST%$regexp(%TITLE%,'^(.+?)\s+[[({\<]?\s\*(?:featuring|feat\.?|ft\.?)\s\*([^])}\>]+)\\>\s\*[])}\>]?(.\*)$',' feat. $2$3+++$1',1) Guessing pattern: %TITLE%+++%ARTIST% From A: Jack Mazzoni, BSharry, Christopher Vitale T: Think About the Way (feat. Carmen Nophra) (Jack Mazzoni VS Christopher Vitale Remix) To A: Jack Mazzoni, BSharry, Christopher Vitale feat. Carmen Nophra T: Think About the Way (Jack Mazzoni VS Christopher Vitale Remix) Action: Guess values Source format: %ARTIST%$regexp(%TITLE%,'^(.+?)\s+[[({\<]?\s\*(?:featuring|feat\.?|ft\.?)\s\*([^])}\>]+)\\>\s\*[])}\>]?(.\*)$',' feat. $2+++$1$3',1) Guessing pattern: %TITLE%+++%ARTIST%**

DD.20150508.0725.CEST

---

<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: [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/conditional-regex-to-move-parts-of-tag-between-title-and-artist/16892/3 "2026-02-09T12:25:40Z")

</div>


