Need help fixing one of my actions

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. ')')'

Try. Untested.

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

Hmmmm, that seemed to replace the first character of every word with "(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)')

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

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. :slight_smile: