# Allowed characters in filter searches? How quoting within expressions work?

**URL:** https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994
**Category:** Mac
**Created:** [July 24, 2022, 12:40pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994 "2022-07-24T12:40:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![b1zguy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/839c29/32.png) [@b1zguy](https://community.mp3tag.de/u/b1zguy)
#### Post date: [July 24, 2022, 12:40pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/1 "2022-07-24T12:40:57Z")

</div>

What characters are allowed within the quotes. For example, I've tried filtering for this tag:

- `genre HAS "Kick+Clap/Snare"` & `genre HAS "Kick+Clap/Snare + ?"  
And I was getting results for the latter genre in the first.

It clearly didn't work so then tried `Kick-Clap_Snare` & `Kick-Clap_Snare+?` to no avail.

This also occurs with searches like: `genre HAS "bounce"` yet showing results with "Melbourne Bounce"

Am I misunderstanding how mp3tag filters?

---

<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: [July 24, 2022, 12:45pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/2 "2022-07-24T12:45:13Z")

</div>

> [@b1zguy](#):
>
> `genre HAS "Kick+Clap/Snare"` & `genre HAS "Kick+Clap/Snare + ?"

I think that this is no valid filter syntax.

> [@b1zguy](#):
>
> `genre HAS "bounce"` yet showing results with "Melbourne Bounce

I would say that the string "Melbourne Bounce" contains (has) the string "bounce" - so everything is fine.  
The shorter the string and the further it is from being unique, the more matches you get.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [July 24, 2022, 1:10pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/3 "2022-07-24T13:10:12Z")

</div>

> [@b1zguy](#):
>
> genre HAS "Kick+Clap/Snare"

This is a substring filter, showing every file that has `Kick+Clap/Snare` in one of the genre fields. This means that it can also contain more text around the search string, e.g., `Kick+Clap/Snare + ?` which has an extra ` + ?`

If you want an exact match, use `genre IS "Kick+Clap/Snare"`

---

<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: [July 24, 2022, 1:16pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/4 "2022-07-24T13:16:26Z")

</div>

> [@Florian](#):
>
> use `genre IS "Kick+Clap/Snare"`

Of if only that complete string is to be matched and not

> [@b1zguy](#):
>
> `Kick-Clap_Snare+?`

then append the filter expression to  
`genre HAS "Kick+Clap/Snare" AND NOT genre HAS "+?"`

---

<div class="post-metadata">

### Author: ![b1zguy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/839c29/32.png) [@b1zguy](https://community.mp3tag.de/u/b1zguy)
#### Post date: [July 24, 2022, 11:15pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/5 "2022-07-24T23:15:05Z")

</div>

> [@Florian](#):
>
> If you want an exact match, use `genre IS "Kick+Clap/Snare"`

But that means it will only match if genre tag only has that string?

---

<div class="post-metadata">

### Author: ![b1zguy](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/839c29/32.png) [@b1zguy](https://community.mp3tag.de/u/b1zguy)
#### Post date: [July 24, 2022, 11:15pm UTC](https://community.mp3tag.de/t/allowed-characters-in-filter-searches-how-quoting-within-expressions-work/57994/6 "2022-07-24T23:15:26Z")

</div>

> [@ohrenkino](#):
>
> then append the filter expression to  
> `genre HAS "Kick+Clap/Snare" AND NOT genre HAS "+?"`

Thank you, this is an ingenious trick!
