# Regex or commands for Filtering, Finding

**URL:** https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565
**Category:** Support
**Created:** [May 21, 2025, 10:30am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565 "2025-05-21T10:30:37Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)
#### Post date: [May 21, 2025, 10:30am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/1 "2025-05-21T10:30:37Z")

</div>

Good morning.  
I need to know which regex or filter command is used to detect if there is any non-capitalized word in the %title% field.  
For example, display (or find) the titles:

My **dog** ​​Is Beaultiful  
My **DOG** Is Beaultiful  
My Dog Is Bea **U** tiful  
My **dOg** Is Bealtiful

But not detect (or find)  
My Dog Is Beaultiful

If this is not possible (or if it is easier), 3 filters and three independent REGEX, to be used separately, one at a time:  
Find or filter title that has one or more words with ALL lowercase letters,  
Find or filter title that has one or more words with ALL uppercase letters  
Find or Filter title that has one or more words, that have uppercase and lowercase letters (except only the first capital letter and the other letters in lowercase).

The big problem is filtering or finding these words when they have accented letters. For example, in pt-BR:  
I Drink Cacha **Ç** a (the correct form would be I Drink Cacha **ç** a)  
Na Minha **é** poca (the correct form would be Na Minha **É** poca)  
Thank you.

---

<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: [May 21, 2025, 10:41am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/2 "2025-05-21T10:41:38Z")

</div>

You can use expressions mentioned here:

> [@Filter expressions](https://community.mp3tag.de/t/filter-expressions/10080/4):
>
> Filter with Regular Expression (Regex) Track numbers that have number/number syntax track MATCHES \d\/\d Filenames that start with two digits: %\_filename% MATCHES ^\d\d Filenames that start with two digits not followed by another digit: %\_filename% MATCHES ^\d\d\D Case sensitive filter: title MATCHES (?-i)regex Files with characters that are not in ISO-8859-1 in tag or filename \* MATCHES [\x{0100}-\x{FFFF}]

For example to filter case sensitive in `_FILENAME`:  
`%_FILENAME% MATCHES (?-i)dog`  
`%_FILENAME% MATCHES (?-i)DOG`

For your special characters like **Ç** or **ç** you could also use the syntax `\x{0123}` - where you have to use the correct value for the characters:  
`%_FILENAME% MATCHES (?-i)\x{00C7}` -\> Ç  
`%_FILENAME% MATCHES (?-i)\x{00E7}` -\> ç

---

<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: [May 21, 2025, 11:07am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/3 "2025-05-21T11:07:36Z")

</div>

> [@JoaoBC](#):
>
> My Dog Is Bea **U** tiful

To filter for words that have lower case letter followed by an upper case, try  
`title MATCHES (?-i)\l\u`

Something similar would look for 2 consecutive upper case letters and so would catch DOG:  
`title MATCHES (?-i)\u\u`

---

<div class="post-metadata">

### Author: ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)
#### Post date: [May 21, 2025, 11:19pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/4 "2025-05-21T23:19:17Z")

</div>

Thanks for the answers.  
It's still not what I need.  
I need to filter tags that have ALL words capitalized, or if it's easier, all those that have at least one word not capitalized.  
Examples:  
My Dog Is Very Beautiful =\> OK  
My Dog Is Very BeauTiful =\> Not OK  
My dOg Is Very Beautiful =\> Not Ok  
My Dog Is Very beautiful =\> Not Ok  
Meu Cachorro É Muito Bonito =\> Ok  
Meu Cachorro é Muito Bonito =\> Não OK  
Meu Cachorro É muiTo Bonito =\> Não Ok

Thanks

---

<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: [May 22, 2025, 5:37am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/5 "2025-05-22T05:37:28Z")

</div>

Try  
`"$strstr($caps(%title%),%title%)" IS 0`

---

<div class="post-metadata">

### Author: ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)
#### Post date: [May 22, 2025, 12:44pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/6 "2025-05-22T12:44:16Z")

</div>

It didn't work either, but don't worry, there may be no solution.

It will be easier to select the folder that contains the songs, order to capitalize, without capitalizing the prepositions (Menu -\> Action -\> Standard) and after that, manually inspect, one by one, the exceptions, such as acronyms and abbreviations that in Brazil are always in upper case (LTDA, SA...) and capitalize prepositions that are part of names and titles, such as "Cool And The Gang", "He Is The Man"...

Thanks !!

---

<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: [May 22, 2025, 1:16pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/7 "2025-05-22T13:16:41Z")

</div>

> [@JoaoBC](#):
>
> My Dog Is Very BeauTiful

I tried my filter and found all the cases that you showed with BeaTiful, dOg, beautiful - which tells me that

> [@JoaoBC](#):
>
> It didn't work either

is far to encompassing.  
So which cases where not covered?

---

<div class="post-metadata">

### Author: ![JoaoBC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@JoaoBC](https://community.mp3tag.de/u/JoaoBC)
#### Post date: [May 23, 2025, 12:45am UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/8 "2025-05-23T00:45:02Z")

</div>

Hello, friend, good evening.  
The examples I wrote are in English, but the tests I did are in Portuguese, with accented letters. I think that's why it didn't work.  
In fact, I discovered it by chance:  
I also used the DBFManager program, which has a function called PROPER(X) that capitalizes the first letter of the string X and the others in lower case, exactly what I want to detect in MP3TAG. This function worked correctly when I turned off the "Use language-specific rules for sorting" option, and it doesn't work at all when I turn this option on. I think that's what's happening in the MP3TAG filter.  
The %title% I used, in Portuguese, were:

Meu dog É Bonito1  
Meu Dog É BoniTo2  
Meu Dog É BONITO3  
Meu DoG É Bonito4  
Meu doG É Bonito5  
Meu Dog É Bonito6  
Meu Dog é Bonito7

BreakNews:

I don't know if it was just a coincidence, but in the MP3TAG program, I went to options, language, changed the program from Portuguese to English and it worked perfectly. From the example above, using:

"$strstr($caps(%title%),%title%)" IS 0

MP3TAG hid line 6 (which is the correct %title%, all words capitalized), and displayed the others, which are the wrong ones - that's exactly what I needed). In short: it worked perfectly.

Thanks.

---

<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: [May 23, 2025, 12:54pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/9 "2025-05-23T12:54:25Z")

</div>

> [@ohrenkino](#):
>
> Try  
> `"$strstr($caps(%title%),%title%)" IS 0`

Is this explanation correct?  
Step #1: Find the first occurrence of the content of the string `$caps(%title%)` in `%title%`  
Step #2: Show the filtered track if the result of the occurence `IS 0` (= not occured, not found)  
_More detailed:_  
The string `$caps(%title%)` returns the current content of `%title%` as mixed case. This means that every first letter in a word will be written in uppercase.

So if the mixed syntax of the `%title%` content is NOT identical with `%title%`  
(because  
`My dOg Is Very Beautiful`  
is not the identical syntax as  
`My Dog Is Very Beautiful`  
) the returned position from `$strstr` will be 0 (= not found, not occured) and the filter condition becomes true.  
If the filter condition is true, the checked track will be listed in the filter result.

---

<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: [May 23, 2025, 12:56pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/10 "2025-05-23T12:56:47Z")

</div>

> [@LyricsLover](#):
>
> Is this explanation correct?

That was my idea. So thank your for the clarification

---

<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: [June 22, 2025, 12:57pm UTC](https://community.mp3tag.de/t/regex-or-commands-for-filtering-finding/68565/11 "2025-06-22T12:57:27Z")

</div>

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