I would like to transform:
"Example Song feat. Someone"
into
"Example Song (feat. Someone)"
I already Googled it and used this code, but replaced "ARTIST" with "TITLE" (and, for aesthetic reasons, "Feat." with "feat.").
The only problem was that it put ')' after any song, not just those songs that had featured artists. I obviously could select only the songs that I need to transform, but I figured some of you might've seen this problem before and already have a solution for this.
Then create an action:
Begin Action Group _Script Test#TEST
Action #1Actiontype 5: Format valueField ______: TITLEFormatstring:$regexp(%TITLE%,'(.+)[^\(]((?=feat\.).+)','$1 ($2)')
End Action Group _Script Test#TEST (1 Action)
Examples of results:
FROM >>> TO
Example Song feat. Someone >>> Example Song (feat. Someone)
fgdgf feat. fsdfsdfl;jyigihkhiutt8y9o >>> fgdgf (feat. fsdfsdfl;jyigihkhiutt8y9o)
Example Song (feat. Someone) >>> Example Song (feat. Someone)
Example Song feat Someone >>> Example Song feat Someone **Doesn't match 'feat'
Example Song Someone >>> Example Song Someone
Example Song (Someone) >>> Example Song (Someone)
yes it searches for anything but '(' and then has a positive lookahead for 'feat.' and unless it finds them then its doesn't match and therefore replace unwanted files.
PS. The filter is handy when you have say 10,000 files and running actions on unwanted files is a waste