# Need help fixing one of my actions

**URL:** <https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631>\
**Category:** Support\
**Created:** [December 26, 2017, 12:16am UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631 "2017-12-26T00:16:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![youngsimba23](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4491bb/32.png) [@youngsimba23](https://community.mp3tag.de/u/youngsimba23)\
**Post date:** [December 26, 2017, 12:16am UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/1 "2017-12-26T00:16:52Z")

</div>

Hi, I hope I posted this in the right place. I have an action to put parenthesis around "feat. xxx" when there are no parenthesis there. The expression works pretty well, except for it adds a closed parenthesis around all tracks regardless of whether or not it contains "feat.". Can someone please help me fix the expression so it does not add a closed parenthesis to every song title?

The whole action is:  
Format Value  
Field: %TITLE%  
Format String: $replace(%TITLE%,' Feat. ',' (Feat. ')')'

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [December 26, 2017, 9:17am UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/2 "2017-12-26T09:17:55Z")

</div>

Try. Untested.

$regexp(%TITLE%,(?i)[^\(]feat\s([^\)]+), (Feat. $1))

---

<div class="post-metadata">

**Author:** ![youngsimba23](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4491bb/32.png) [@youngsimba23](https://community.mp3tag.de/u/youngsimba23)\
**Post date:** [December 26, 2017, 2:43pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/3 "2017-12-26T14:43:40Z")

</div>

Hmmmm, that seemed to replace the first character of every word with "(Feat. )"

---

<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 26, 2017, 3:12pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/4 "2017-12-26T15:12:36Z")

</div>

> [@YoungSimba](#):
>
> ...  
> The whole action is:  
> Format Value  
> Field: %TITLE%  
> Format String: $replace(%TITLE%,' Feat. ',' (Feat. ')')'

I would say that this action replaces every "Feat. XYZ" with "(Feat. ) XYZ".  
I think you need a regular expression like  
Format String: $regexp(%title%,' Feat. (.\*)',' (Feat. $1)')

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [December 26, 2017, 3:24pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/5 "2017-12-26T15:24:10Z")

</div>

> [@YoungSimba](#):
>
> Hmmmm, that seemed to replace the first character of every word with "(Feat. )"

Try  
$regexp(%TITLE%,'(?i)([^(])\s+feat.\s+([^)]+)','$1 (Feat. $2)')

---

<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 26, 2017, 5:12pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/6 "2017-12-26T17:12:27Z")

</div>

Having ...  
TITLE = 'Las Vegas feat. Annie Spider'

... and should give ...  
TITLE = 'Las Vegas (Feat. Annie Spider)'

... this regular expression works for me ...

```
$regexp(%TITLE%,'(?i)([^\(])\s+feat\.?\s+([^\)]+)','$1 (Feat. $2)')

```

DD.20171226.1912.CET

---

<div class="post-metadata">

**Author:** ![youngsimba23](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/y/4491bb/32.png) [@youngsimba23](https://community.mp3tag.de/u/youngsimba23)\
**Post date:** [December 26, 2017, 6:59pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/7 "2017-12-26T18:59:04Z")

</div>

> [@ohrenkino](#):
>
> I would say that this action replaces every "Feat. XYZ" with "(Feat. ) XYZ".  
> I think you need a regular expression like  
> Format String: $regexp(%title%,' Feat. (.\*)',' (Feat. $1)')

> [@stevehero](#):
>
> Try
> 
> ```
> $regexp(%TITLE%,'(?i)([^\(])\s+feat\.\s+([^\)]+)','$1 (Feat. $2)')
> 
> ```

> [@DetlevD](#):
>
> Having ...  
> TITLE = 'Las Vegas feat. Annie Spider'
> 
> ... and should give ...  
> TITLE = 'Las Vegas (Feat. Annie Spider)'
> 
> ... this regular expression works for me ...
> 
> ```
> $regexp(%TITLE%,'(?i)([^\(])\s+feat\.?\s+([^\)]+)','$1 (Feat. $2)')
> 
> ```
> 
> DD.20171226.1912.CET

These all work thank you guys so much for your help. 🙂

---

<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:27pm UTC](https://community.mp3tag.de/t/need-help-fixing-one-of-my-actions/19631/8 "2026-02-09T12:27:09Z")

</div>


