# Changing parentheses to brackets if they contain certain words

**URL:** <https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718>\
**Category:** Support\
**Created:** [May 6, 2014, 6:38am UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718 "2014-05-06T06:38:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 6, 2014, 6:38am UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/1 "2014-05-06T06:38:54Z")

</div>

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

---

<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:** [May 6, 2014, 8:33am UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/2 "2014-05-06T08:33:40Z")

</div>

> [@Guttersnipe](#):
>
> 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 ...

**$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

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 7, 2014, 2:24pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/3 "2014-05-07T14:24:29Z")

</div>

> [@DetlevD](#):
>
> **$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?

---

<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:** [May 7, 2014, 3:44pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/4 "2014-05-07T15:44:05Z")

</div>

> [@Guttersnipe](#):
>
> 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:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:")

DD.20140507.1943.CEST

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 7, 2014, 6:05pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/5 "2014-05-07T18:05:55Z")

</div>

> [@DetlevD](#):
>
> Use action "Format value" and you are a lucky man. ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":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

 ![](https://community.mp3tag.de/uploads/default/original/2X/5/53536bb2c100fff58fa28e701dec1064bbcbd02e.png)

---

<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:** [May 7, 2014, 8:42pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/6 "2014-05-07T20:42:04Z")

</div>

> [@Guttersnipe](#):
>
> tried ... and..... nothing....  
> Ami I doing something wrong? Screenshot attached ...

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

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 7, 2014, 9:41pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/7 "2014-05-07T21:41:00Z")

</div>

> [@DetlevD](#):
>
> 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.

---

<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:** [May 8, 2014, 6:55am UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/8 "2014-05-08T06:55:13Z")

</div>

> [@Guttersnipe](#):
>
> ... What I was actually looking at what to do was to change parentheses to braqckets if the text within the ~~brackets~~ _parentheses_ contain the words mix, live, remix, or edit etc. ...

**$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

---

<div class="post-metadata">

**Author:** ![Guttersnipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/ebca7d/32.png) [@Guttersnipe](https://community.mp3tag.de/u/Guttersnipe)\
**Post date:** [May 8, 2014, 11:32am UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/9 "2014-05-08T11:32:28Z")

</div>

> [@DetlevD](#):
>
> **$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 😃

---

<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:25pm UTC](https://community.mp3tag.de/t/changing-parentheses-to-brackets-if-they-contain-certain-words/15718/10 "2026-02-09T12:25:02Z")

</div>


