# Regexp help

**URL:** https://community.mp3tag.de/t/regexp-help/14416
**Category:** Support
**Created:** [February 1, 2013, 4:05am UTC](https://community.mp3tag.de/t/regexp-help/14416 "2013-02-01T04:05:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Oblio](https://community.mp3tag.de/user_avatar/community.mp3tag.de/oblio/32/4828_2.png) [@Oblio](https://community.mp3tag.de/u/Oblio)
#### Post date: [February 1, 2013, 4:05am UTC](https://community.mp3tag.de/t/regexp-help/14416/1 "2013-02-01T04:05:54Z")

</div>

I am trying to match a literal right round bracket ")" in the filter e.g.

```
%album% MATCHES \)

```

matches everything!

Other brackets are ok []{}( but not )

Is this expected behavior or a bug?

---

<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: [February 1, 2013, 6:51am UTC](https://community.mp3tag.de/t/regexp-help/14416/2 "2013-02-01T06:51:00Z")

</div>

> [@Oblio](#):
>
> I am trying to match a literal right round bracket ")" in the filter ...

The logical operator MATCHES expects a regular expression, what you did right.  
This works ...  
**ALBUM MATCHES ")"**  
... or ...  
**"%ALBUM%" MATCHES ")"**

See also ...  
[https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)  
There seems to be a difference between documentation and behaviour.

DD.20130201.0850.CET

---

<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: [February 1, 2013, 8:14am UTC](https://community.mp3tag.de/t/regexp-help/14416/3 "2013-02-01T08:14:43Z")

</div>

> [@DetlevD](#):
>
> The logical operator MATCHES expects a regular expression, ...

I think there was a thread somewhere in which the benefits of the various filter operators were layed out.  
I think I remember that if you want to filter for simply a single known character (that does not require a regular expression) then the operator HAS would be the one with the better performance.  
So,  
ALBUM HAS ")"  
would do the trick "better" (and the operator requires less typing 😉 )

---

<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: [February 1, 2013, 11:40am UTC](https://community.mp3tag.de/t/regexp-help/14416/4 "2013-02-01T11:40:11Z")

</div>

> [@ohrenkino](#):
>
> ... I think I remember that if you want to filter for simply a single known character (that does not require a regular expression) then the operator HAS would be the one with the better performance. ...

Good point.  
_(But ... 'better performance' is only a guess, because internally the operator HAS is assumingly implemented as a regular expression.)_

A filter for names with a trailing closing round bracket ...  
**ALBUM MATCHES ")$"**

Using a little trick the operator HAS can do it too ...  
**"%ALBUM%$" HAS ")$"**  
... or ...  
**"%ALBUM%===" HAS ")==="**

DD.20130201.1333.CET

---

<div class="post-metadata">

### Author: ![Oblio](https://community.mp3tag.de/user_avatar/community.mp3tag.de/oblio/32/4828_2.png) [@Oblio](https://community.mp3tag.de/u/Oblio)
#### Post date: [February 19, 2013, 12:09am UTC](https://community.mp3tag.de/t/regexp-help/14416/5 "2013-02-19T00:09:58Z")

</div>

OK thanks. Thanks also for the little tricks DetlevD. You seem to have a lot of tricks up your sleeve!

So for filter matching literal right round bracket: _surround whole expression in double quotes._

But in this example by pone each literal round bracket is surrounded by single quotes:

[Add parentheses To featured artist](https://community.mp3tag.de/t/10701/5)

Why is this necessary? Just trying to understand.

---

<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: [February 19, 2013, 6:20am UTC](https://community.mp3tag.de/t/regexp-help/14416/6 "2013-02-19T06:20:26Z")

</div>

> [@Oblio](#):
>
> ... So for filter matching literal right round bracket: _surround whole expression in double quotes._  
> But in this example by pone each literal round bracket is surrounded by single quotes:...  
> Why is this necessary? Just trying to understand.

Mp3tag provides several scripting languages, each one designed for special purpose.  
Mp3tag Converter and Action Scripting Language  
Mp3tag Export Scripting Language  
Mp3tag Websource Scripting Language  
Mp3tag Filter Scripting Language  
Each scripting language follows its own rules.

DD.20130219.0814.CET

---

<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:24pm UTC](https://community.mp3tag.de/t/regexp-help/14416/7 "2026-02-09T12:24:18Z")

</div>


