# Problem with $regexp and brackets

**URL:** <https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285>\
**Category:** Support\
**Created:** [December 13, 2019, 3:29pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285 "2019-12-13T15:29:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![meesterguyperson](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@meesterguyperson](https://community.mp3tag.de/u/meesterguyperson)\
**Post date:** [December 13, 2019, 3:29pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285/1 "2019-12-13T15:29:03Z")

</div>

I know this has been brought up before, but wondering if there is a fix. I have the following expression, which should replace all open brackets with nothing:

`$regexp(%album%,[,)`

As I understand, because "[" is a reserved character, it has to be surrounded in single quotes to parse correctly, which gives me this:

`$regexp(%album%,'[',)`

I also tried both of these.

`$regexp(%album%,[[],)`  
`$regexp(%album%,['['],)`

None of these work. It seems that regardless of how I go about it, a "[" will always register as a special character within a regex, and there is no valid way to denote the character itself. Though I have a workaround for my specific case, it seems strange that there is no way to do this. Does anyone have any clues here?

---

<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:** [December 13, 2019, 4:13pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285/2 "2019-12-13T16:13:53Z")

</div>

> [@meesterguyperson](#):
>
> As I understand, because "[" is a reserved character, it has to be surrounded in single quotes

It actually has to be the backslash to escape special characters:  
`\[`

---

<div class="post-metadata">

**Author:** ![ryerman](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ryerman/32/5285_2.png) [@ryerman](https://community.mp3tag.de/u/ryerman)\
**Post date:** [December 13, 2019, 4:20pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285/3 "2019-12-13T16:20:59Z")

</div>

`$regexp(%artist%,\'[',)`  
or without regex:  
`$replace(%artist%,'[',)`

---

<div class="post-metadata">

**Author:** ![meesterguyperson](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@meesterguyperson](https://community.mp3tag.de/u/meesterguyperson)\
**Post date:** [December 13, 2019, 7:01pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285/4 "2019-12-13T19:01:50Z")

</div>

Ah, I was close! Much appreciated!

---

<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:28pm UTC](https://community.mp3tag.de/t/problem-with-regexp-and-brackets/47285/5 "2026-02-09T12:28:21Z")

</div>


