# RegEx to keep all text in brackets

**URL:** https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797
**Category:** Support
**Created:** [June 10, 2025, 4:49am UTC](https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797 "2025-06-10T04:49:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [June 10, 2025, 4:49am UTC](https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797/1 "2025-06-10T04:49:31Z")

</div>

Hi All

I use this RegEx in an action to remove everything in brackets in the COMMENT Column :

Field : COMMENT

Regular Expression : `(.*?)\s*\(.*\)`

Replace Matches With : $1

This works fine and removes all text in brackets , including the brackets themselves.

I'm trying now to have the expression KEEP everything in brackets and remove the rest of the phrase.

So

piano pieces(paul crossley)  
piano distance (yuji takahashi)  
orion (tsuyoshi tsutsumi, seiko seki)  
in the woods (kiyoshi shomura)

Would become

paul crossley  
yuji takahashi  
tsuyoshi tsutsumi, seiko seki  
kiyoshi shomura

Can someone suggest some RegEx to satisfy this?

Grateful for any advice. 🙂

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 10, 2025, 6:05am UTC](https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797/2 "2025-06-10T06:05:53Z")

</div>

You could try this regular expression:  
`.*\((.*)\)`  
Replace with $1

 ![image](https://community.mp3tag.de/uploads/default/original/3X/c/2/c202c1570d582e5fedfd4cc36d97ba3b06249106.png)

This regular expression only works if there is only one pair of brackets at the end of your string. It would not work for  
(another) piano pieces (paul crossley)

---

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [June 10, 2025, 6:45am UTC](https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797/3 "2025-06-10T06:45:05Z")

</div>

Hi LyricsLover - Many Thanks. That's working perfectly.

🙂 🙂

---

<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: [July 10, 2025, 6:45am UTC](https://community.mp3tag.de/t/regex-to-keep-all-text-in-brackets/68797/4 "2025-07-10T06:45:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
