Changing parentheses to brackets if they contain certain words

Looking to set a rule so if text within title is in parentheses they will be changed to brackets if they contain the words remix, live, mix, edit

So for example, text before would be

Song title (feat. Artist) (Example Remix)
Song title (feat. Artist) (Example Mix)
Song title (feat. Artist) (Radio Edit)
Song title (feat. Artist) (Live at a fictional venue)

After changes it would be

Song title (feat. Artist) [Example Remix]
Song title (feat. Artist) [Example Mix]
Song title (feat. Artist) [Radio Edit]
Song title (feat. Artist) [Live at a fictional venue]

I had a fiddle about with replace with regular expression but with no luck thus far...

Any help appreciated.

Cheers

Guttersniper

$replace(%TITLE%,'(Example Remix)','[Example Remix]') $replace(%TITLE%,'(Example Mix)','[Example Mix]') $replace(%TITLE%,'(Radio Edit)','[Radio Edit]') $replace(%TITLE%,'(Live at a fictional venue)','[Live at a fictional venue]') ... or ... $replace(%TITLE%, '(Example Remix)','[Example Remix]','(Example Mix)','[Example Mix]','(Radio Edit)', '[Radio Edit]','(Live at a fictional venue)','[Live at a fictional venue]') ... or ... $regexp(%TITLE%,'^(.+?)\s(\(.+?\))\s\((.+?)\)$','$1 $2 [$3]') ... or ... $regexp(%TITLE%,'^(.+?)\s(\(.+?\))\s\((.*\b(?:remix|live|mix|edit)\b.*)\)$','$1 $2 [$3]',1)

DD.20140506.1233.CEST

Slightly lost, where should I be putting this in?
Actions obviously but under Format value or replace wit regular value or what?

Use action "Format value" and you are a lucky man. :rolleyes:

DD.20140507.1943.CEST

tried

$regexp(%TITLE%,'^(.+?)\s((.+?))\s((.+?))$','$1 $2 [$3]')
... or ...
$regexp(%TITLE%,'^(.+?)\s((.+?))\s((.\b(?:remix|live|mix|edit)\b.))$','$1 $2 [$3]',1)

copying the entirety into format value and..... nothing....

Ami I doing something wrong?
Screenshot attached is of the aftermath of applying the bottom one


Your screenshot shows, that there is no text in the column "Title" or in the column "Filename", whose format is conform to your order description.

Using the proposals from above you can change text ...
From:
Song title (feat. Artist) (Live at a fictional venue)
To:
Song title (feat. Artist) [Live at a fictional venue]

The given text string has to be structured into three parts ...
text (text) (text)
.. then it will be converted to ...
text (text) [text]

Because your text strings do not match the wanted function, ...
there is no change, and this is good, therefore the text strings remain untouched.
So the functions are working properly.

Good luck!

DD.20140508.0041.CEST

Ah. I see
I think i was misleading then, albeit unwittingly, in what I asked originally.

What I was actually looking at what to do was to change parentheses to braqckets if the text within the brackets contain the words mix, live, remix, or edit etc.

is that possible, I think it is but currently stuck figuring out where to begin.
I'll have a go at tweaking what you posted earlier but if you could point me in the right direction that would be most helpful and I would be extremely grateful.

Thanks for your help so far dude.

$regexp(%TITLE%,'\(([^(]*\b(?:remix|live|mix|edit)\b[^)]*)\)','[$1]',1) From: Brains Out (live) Song title (name of mix) [Acapella] Title (aaa Radio Mix bbb) (EDIT) name of song (name of mix) Song Title (feat. Xyz) [Abc remix] To: Brains Out [live] Song title [name of mix] [Acapella] Title [aaa Radio Mix bbb] [EDIT] name of song [name of mix] Song Title (feat. Xyz) [Abc remix]

DD.20140508.1055.CEST

Works an absolute charm. Thank you so much :smiley: