# A regex queries to delete the first instance of everything in a parenthesis

**URL:** https://community.mp3tag.de/t/a-regex-queries-to-delete-the-first-instance-of-everything-in-a-parenthesis/59233
**Category:** Support
**Created:** [November 29, 2022, 4:48am UTC](https://community.mp3tag.de/t/a-regex-queries-to-delete-the-first-instance-of-everything-in-a-parenthesis/59233 "2022-11-29T04:48:02Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [November 29, 2022, 6:33am UTC](https://community.mp3tag.de/t/a-regex-queries-to-delete-the-first-instance-of-everything-in-a-parenthesis/59233/2 "2022-11-29T06:33:44Z")

</div>

Please test your expressions in MP3tag with Convert\>Tag-Tag and the scripting function $regexp()

To replace everything leading in parenthesis, try Convert\>Tag-Tag for TITLE:  
Format string: `$regexp(%title%,^\(.*?\)\s*,)`

In general, to address the captured string part, use $1 instead of \1

... and there are a lot of threads that deal with the removal of parenthesis and their contents, e.g.

> [@Removing Parenthesis in Titles Along with Spaces](https://community.mp3tag.de/t/removing-parenthesis-in-titles-along-with-spaces/58917):
>
> I found this Action: It works but it leaves a space in the title. It's not that big a deal when the parenthesis are at the end, but it's an issue when they're at the beginning. "(I Just) Died in Your Arms" becomes " Died in Your Arms". Can the parenthesis be removed along with the extra space? Edit: Here's what that linked Action is doing so you don't have to download it to see: Regular expression: \(.+\)

---

_[View the full topic](https://community.mp3tag.de/t/a-regex-queries-to-delete-the-first-instance-of-everything-in-a-parenthesis/59233)._
