# How to remove parentheses and move contents

**URL:** https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550
**Category:** Support
**Created:** [June 15, 2012, 8:58pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550 "2012-06-15T20:58:20Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Wyoet](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/c37758/32.png) [@Wyoet](https://community.mp3tag.de/u/Wyoet)
#### Post date: [June 15, 2012, 8:58pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/1 "2012-06-15T20:58:20Z")

</div>

Hi all. As a newbie I have created 7 actions on my own and have searched the forum, but find I need help with this one. I have songs that display the number they charted at in the title:  
Example: Born To Run (#45).  
The numbers are different for each song. What expression do I use to remove the parentheses from the title field and move the pound sign and the number to the comment field preceded by the word charted  
Example:  
Title: Born To Run (#3) changed to  
Title: Born To Run and  
Comment: Charted #3  
Thanks for your help. Paul

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 16, 2012, 5:01am UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/2 "2012-06-16T05:01:07Z")

</div>

> [@Wyoet](#):
>
> ...  
> Example:  
> Title: Born To Run (#3) changed to  
> Title: Born To Run and  
> Comment: Charted #3  
> Thanks for your help. Paul

You could use an action of the type "Guess values" for TITLE with the format string  
%title% (%comment%)  
This should move the stuff in brackets to comment. YOu would be missing the "Charted" though which you could easily add with an action as described in the FAQs:  
[/t/967/1](https://community.mp3tag.de/t/967/1)

---

<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: [June 16, 2012, 5:08am UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/3 "2012-06-16T05:08:14Z")

</div>

> [@Wyoet](#):
>
> ... I have songs that display the number they charted at in the title:  
> Example: Born To Run (#45).  
> The numbers are different for each song. What expression do I use to remove the parentheses from the title field and move the pound sign and the number to the comment field preceded by the word charted  
> Example:  
> Title: Born To Run (#3) changed to  
> Title: Born To Run and  
> Comment: Charted #3  
> ...

Set Filter: **TITLE MATCHES "^(.+?)\s((#\d+))$"**

In one go ...  
Action: Guess values  
Source format: **$regexp(%TITLE%,'^(.+?)\s((#\d+))$','$1===Charted $2')**  
Format string: **%TITLE%===%COMMENT%**

In two steps ...  
Action: Guess values  
Source format: **%TITLE%**  
Format string: **%TITLE% (%COMMENT%)**

Action: Format value  
Field: COMMENT  
Format string: **'Charted '%COMMENT%**

DD.20120616.0907.CEST  
Edit.DD.20120618.1922.CEST

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [June 16, 2012, 9:31pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/4 "2012-06-16T21:31:23Z")

</div>

> [@DetlevD](#):
>
> In one go ...  
> Action: Guess values  
> Source format: **$regexp(%TITLE%,'^(.+?)\s((#\d+))$','$1===Charted $2')**  
> Format string: **%TITLE%===%COMMENT%**
> 
> DD.20120616.0907.CEST

Hi DetlevD,

Nice clean method for doing this task, could you tell me where this is documented in the help?

Also how do you make your expressions so nice and colourful? PS I've always wondered that but never asked. Thanks.

---

<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: [June 17, 2012, 4:18am UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/5 "2012-06-17T04:18:40Z")

</div>

> [@stevehero](#):
>
> Hi DetlevD, Nice clean method for doing this task, could you tell me where this is documented in the help?  
> Also how do you make your expressions so nice and colourful? PS I've always wondered that but never asked. Thanks.

Hi 'stevehero', the method to prepare the format of a string, which in turn fits to the guessing scheme to be applied, seems to be an evolvement from members of this forum.  
It is simply word processing, cleverly applied.  
I do not know who was the first one, Dano, pone, me, you?  
An intensive forum recherche will find it out for sure.

For colorizing the Mp3tag scripting expressions I use an adaption of my WBT2HTML syntax colorizer.  
Once the syntax rules of the programming language are defined, any other available programming language syntax colorizer can do it. Here in this case the output is written in BBCode.

Today nearly all good text editors support syntax colorizing, e. g. KEDIT, Textpad, Ultraedit, Notepad++.  
Notepad++, with installed plugins and Mp3tag language support, can export Mp3tag scripting language to coloured RTF format.

DD.20120617.0818.CEST

---

<div class="post-metadata">

### Author: ![Wyoet](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/c37758/32.png) [@Wyoet](https://community.mp3tag.de/u/Wyoet)
#### Post date: [June 18, 2012, 2:03pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/6 "2012-06-18T14:03:32Z")

</div>

> [@ohrenkino](#):
>
> You could use an action of the type "Guess values" for TITLE with the format string  
> %title% (%comment%)  
> This should move the stuff in brackets to comment. YOu would be missing the "Charted" though which you could easily add with an action as described in the FAQs:  
> [/t/967/1](https://community.mp3tag.de/t/967/1)

Wow! Thank you so much. As always, one solution leads to another question. How can I modify the string you gave me to work the same way if the title reads:

Title = Born To Run (#82-'67) changed to  
Title = Born To Run and Comment = Charted #82

As you see, on some of the titles there is the year with a ' in front of it. I have studied and played with the string you gave me which works for about 90 % of my music, but I can't figure out the changes for this. Once again thank you.

---

<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: [June 18, 2012, 3:19pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/7 "2012-06-18T15:19:52Z")

</div>

> [@Wyoet](#):
>
> ...Title = Born To Run (#82-'67)  
> changed to  
> Title = Born To Run  
> and Comment = Charted #82  
> ...

Set Filter: **TITLE MATCHES "^(.+?)\s((#\d+)-.+)$"**

In one go ...  
Action: Guess values  
Source format: **$regexp(%TITLE%,'^(.+?)\s((#\d+)-.+)$','$1===Charted $2')**  
Format string: **%TITLE%===%COMMENT%**

In two steps ...  
Action: Guess values  
Source format: **%TITLE%**  
Format string: **%TITLE% (%COMMENT%-%DUMMY%)**

Action: Format value  
Field: COMMENT  
Format string: **'Charted '%COMMENT%**

DD.20120618.1922.CEST

---

<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: [June 18, 2012, 3:34pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/8 "2012-06-18T15:34:59Z")

</div>

To handle both cases at once (from post #3 and #7)

Set Filter: **TITLE MATCHES "^(.+?)\s((#\d+)(-.+)?)$"**

In one go ...  
Action: Guess values  
Source format: **$regexp(%TITLE%,'^(.+?)\s((#\d+)(-.+)?)$','$1===Charted $2')**  
Format string: **%TITLE%===%COMMENT%**

DD.20120618.1936.CEST

---

<div class="post-metadata">

### Author: ![Wyoet](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/c37758/32.png) [@Wyoet](https://community.mp3tag.de/u/Wyoet)
#### Post date: [June 18, 2012, 4:04pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/9 "2012-06-18T16:04:01Z")

</div>

Thank you sir. This works for nearly all of them. You have saced me hours of typing. You are the king

---

<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:23pm UTC](https://community.mp3tag.de/t/how-to-remove-parentheses-and-move-contents/13550/10 "2026-02-09T12:23:54Z")

</div>


