# Regex not working in specific situation for (Featuring)

**URL:** https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307
**Category:** Support
**Created:** [October 6, 2023, 7:12pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307 "2023-10-06T19:12:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![sheepdisease](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/d07c76/32.png) [@sheepdisease](https://community.mp3tag.de/u/sheepdisease)
#### Post date: [October 6, 2023, 7:12pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/1 "2023-10-06T19:12:25Z")

</div>

Hello there, usually this works well.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/cc65f33e00c9e45e703e80813f24f7c33b0dfaca.png)

The track it's not doing anything to though is "20 Broken (Featuring Amy Lee).mp3"

I can't understand why it's not changing the formatting to "20 Broken (feat. Amy Lee).mp3?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [October 6, 2023, 7:25pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/2 "2023-10-06T19:25:25Z")

</div>

Please let us copy & paste your existing regular expression and don't let us type it character by character.  
Your screenshot is fine, but please add the regex formatted as code like this:  
`(?i)(\s)f(?:ea)?t(?:(?:\.?|\s)|uring)(?=\s)`

BTW:  
If you use a [code snippet from this forum](https://community.mp3tag.de/t/featuring-all-derivatives/9445/4) please read the exact use case.  
This one is for some derivates of "featuring" **if it is has a leading space**.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/ddd5850df9b2aac5e0315b30684a4992a40e7e5c.png)

Your example has an opening bracket (not a space) in front of "Featuring".

And your replacement text has also a space in front of `␣feat.`  
This would make "20 Broken` ( feat.` Amy Lee).mp3" if it would match at all.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [October 8, 2023, 12:20pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/3 "2023-10-08T12:20:50Z")

</div>

5 posts were split to a new topic: [Tool to visualize (and explain) regular expressions?](https://community.mp3tag.de/t/tool-to-visualize-and-explain-regular-expressions/62328)

---

<div class="post-metadata">

### Author: ![Stem75](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stem75/32/5007_2.png) [@Stem75](https://community.mp3tag.de/u/Stem75)
#### Post date: [October 27, 2023, 11:53pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/4 "2023-10-27T23:53:18Z")

</div>

Try this:

find

`(\s?)\bf(ea)?t(uring)?\b\s?\.?[^\w]`

replace

`\1feat.space`  
change the word "space" to real space

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [October 28, 2023, 9:54am UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/5 "2023-10-28T09:54:34Z")

</div>

For those who prefer a preview in Tag -\> Tag:  
Formatstring:  
`$regexp(%TITLE%,(\s?)\bf(ea)?t(uring)?\b\s?\.?[^\w],feat. ,1)`

 ![image](https://community.mp3tag.de/uploads/default/original/2X/d/d828af5e29ff4904907baa3b7a0f648c165ae757.png)

![image](https://community.mp3tag.de/uploads/default/original/2X/9/9197ec17fcf685996a63fc3d84915837af90c963.png)

Hint:  
The replacement `feat.` will replace both variants (uppercase and lowercase) F with a lowercase f as the OP asked.

---

<div class="post-metadata">

### Author: ![Stem75](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stem75/32/5007_2.png) [@Stem75](https://community.mp3tag.de/u/Stem75)
#### Post date: [October 28, 2023, 12:40pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/6 "2023-10-28T12:40:32Z")

</div>

Needs to be like this:

`$regexp(%TITLE%,(\s?)\bf(ea)?t(uring)?\b\s?\.?[^\w],\1feat. ,1)`

There should be \1 for cases like this:  
Something featuring (featuring noone)

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [October 28, 2023, 12:55pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/7 "2023-10-28T12:55:42Z")

</div>

> [@Stem75](#):
>
> Something featuring (featuring noone)

You are right.

Whyever someone wants to see "feat. " twice:  
`Something feat. (feat. noone)`  
as result.

As always:  
Be careful with such edge cases. The space between `feat.` and the opening bracket `(` in  
`Something feat.␣(Featuring noone)`  
will be duplicated and results in  
`Something feat.␣␣(feat. noone)`

The same is true for  
`Something featuring (Feat.␣noone)`  
which results in duplicated spaces after the second `feat.`  
`Something feat. (feat.␣␣noone)`

_␣ = space, just for better readability._

---

<div class="post-metadata">

### Author: ![Stem75](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stem75/32/5007_2.png) [@Stem75](https://community.mp3tag.de/u/Stem75)
#### Post date: [October 28, 2023, 2:15pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/8 "2023-10-28T14:15:59Z")

</div>

You've got a point.  
Take a look at this, might work better:

`$regexp(%TITLE%,(\b\s)?\s*\bf(ea)?t(uring)?\b\.?(?:(\s*|[^\w])),\1feat. ,1)`

With my testings it turns this:

```auto
Mrs. X FT. FT FEAT FEAT. FEATURING Ft ft Feat feat Feat. feat. Featuring featuring Mr. Y
20 Broken (Featuring Amy Lee)
20 Broken (Feat Amy Lee)
20 Broken ( Feat. Amy Lee)
Something featuring (featuring noone)
Something feat. (featuring noone)
Something feat. (featuring noone)
Something featuring (feat. noone)
Something feat. (feat. noone)
Something feat (feat noone)
Something feat. ( feat. noone)
Something feat ( feat noone)
Something featuring (featuring noone)
Something feat. (feat. noone)
Something feat (feat noone)

```

Into this:

```auto
Mrs. X feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. Mr. Y
20 Broken (feat. Amy Lee)
20 Broken (feat. Amy Lee)
20 Broken (feat. Amy Lee)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)
Something feat. (feat. noone)

```

---

<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:30pm UTC](https://community.mp3tag.de/t/regex-not-working-in-specific-situation-for-featuring/62307/9 "2026-02-09T12:30:10Z")

</div>


