# How to filter filenames that start with only lowercase?

**URL:** <https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349>\
**Category:** Support\
**Created:** [April 22, 2012, 11:53pm UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349 "2012-04-22T23:53:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mandah](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mandah](https://community.mp3tag.de/u/Mandah)\
**Post date:** [April 22, 2012, 11:53pm UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/1 "2012-04-22T23:53:19Z")

</div>

I tried **%\_filename% MATCHES ^\l** but that seems to return any filename that starts with a word character; it is not bringing me only filenames that start with lowercase letters. Grrr, what to do?

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [April 23, 2012, 1:05am UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/2 "2012-04-23T01:05:24Z")

</div>

Use:  
**%\_filename% MATCHES (?-i)^\l**

You have to force the search function within mp3tag to search case sensitive. Not sure if its a bug or not but the (?-i) matches the remainder of the regexp as case sensitive.

If and I assume you want to change the 1st letter of the string to UPPER case then here is the action to match:

_Action type:_ **Replace with regular expression**  
_Field:_ **\_FILENAME**  
_Regular expression:_ **^([a-z])**  
_Replace matches with:_ **$upper($1)**

[x] case-sensitive comparison

Make sure case sensitive comparison is checked.

---

<div class="post-metadata">

**Author:** ![Mandah](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8e8cbc/32.png) [@Mandah](https://community.mp3tag.de/u/Mandah)\
**Post date:** [April 23, 2012, 9:44am UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/3 "2012-04-23T09:44:58Z")

</div>

> [@stevehero](#):
>
> Use:  
> **%\_filename% MATCHES (?-i)^\l**
> 
> You have to force the search function within mp3tag to search case sensitive. Not sure if its a bug or not but the (?-i) matches the remainder of the regexp as case sensitive.

Thanks =) its actually because I was trying to delete spaces, hypens, periods and numbers that were before any of those characters but I ended up deleting that plus the first character of every single filename! I've just been semi-manually changing them all back (mp3tag crashed when I tried to undo changes). Sigh. I haven't had the time to learn codes so thanks very much for the reply.

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [April 23, 2012, 11:29am UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/4 "2012-04-23T11:29:49Z")

</div>

> [@Mandah.](#):
>
> Thanks =) its actually because I was trying to delete spaces, hypens, periods and numbers that were before any of those characters but I ended up deleting that plus the first character of every single filename! I've just been semi-manually changing them all back (mp3tag crashed when I tried to undo changes). Sigh. I haven't had the time to learn codes so thanks very much for the reply.

Opps! 😳

But as the saying goes you always learn the hard way. So a good rule of thumb is to test on dummy/single files first.

---

<div class="post-metadata">

**Author:** ![incifinci](https://community.mp3tag.de/user_avatar/community.mp3tag.de/incifinci/32/6526_2.png) [@incifinci](https://community.mp3tag.de/u/incifinci)\
**Post date:** [November 5, 2021, 8:44pm UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/5 "2021-11-05T20:44:25Z")

</div>

> [@stevehero](#):
>
> **%\_filename% MATCHES (?-i)^\l**
> 
> You have to force the search function within mp3tag to search case sensitive.

Dear @Florian, i think, this should be included [in the help](https://docs.mp3tag.de/actions/replace-regexp).

* * *

By the way, \[1\] is not a solution for non latin characters. But **\l** find them.

And: you must to **repeat in every filter part**.

This one does not work:  
`probleme IS "Lowercase name" OR %composer% MATCHES (?-i)^\l OR %arranger% MATCHES ^\l OR %lyricist% MATCHES ^\l OR %albumartist% MATCHES ^\l OR %artist% MATCHES ^\l OR %conductor% MATCHES ^\l`

This one does:  
`probleme IS "Lowercase name" OR %composer% MATCHES (?-i)^\l OR %arranger% MATCHES (?-i)^\l OR %lyricist% MATCHES (?-i)^\l OR %albumartist% MATCHES (?-i)^\l OR %artist% MATCHES (?-i)^\l OR %conductor% MATCHES (?-i)^\l`

* * *

Unfortunately, this second variant is not perfect, too: it does not find lowercase in the second, third composer/artist etc. It seems, line start (^) means the whole list's start, in this case. I could not find a solution. I tried even this:  
`"$ifgreater($strstr($regexp($meta_sep(composer,◆),'◆(?-i)\l',◆,0),◆),0,1,)" IS 1`  
...with no success. (It finds **all** files with multiple composer, even with uppercase start.)  
To repeat the filter for all, from $meta(composer,0) to $meta(composer,10) is not very comfortable. All right, i do now a temporarly filter expression, repeating all for some possible items (composer 1st, 2nd, 3rd...), but it would be better, **if somebody could tell a nice, real solution**.

So, anyone, who needs it, can copy this temporary filter:

> probleme IS "Lowercase name" OR "$meta(composer,0)" MATCHES (?-i)^\l OR "$meta(composer,1)" MATCHES (?-i)^\l OR "$meta(composer,2)" MATCHES (?-i)^\l OR "$meta(composer,3)" MATCHES (?-i)^\l OR "$meta(composer,4)" MATCHES (?-i)^\l OR %arranger% MATCHES (?-i)^\l OR "$meta(lyricist,0)" MATCHES (?-i)^\l OR "$meta(lyricist,1)" MATCHES (?-i)^\l OR %albumartist% MATCHES (?-i)^\l OR "$meta(artist,0)" MATCHES (?-i)^\l OR "$meta(artist,1)" MATCHES (?-i)^\l OR "$meta(artist,2)" MATCHES (?-i)^\l OR "$meta(artist,3)" MATCHES (?-i)^\l OR "$meta(artist,4)" MATCHES (?-i)^\l OR "$meta(conductor,0)" MATCHES (?-i)^\l OR "$meta(conductor,1)" MATCHES (?-i)^\l

But, it is a good idea to get a small pillow, just before filtering a few tens of thousands of files.

* * *

1. a-z

---

<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:23pm UTC](https://community.mp3tag.de/t/how-to-filter-filenames-that-start-with-only-lowercase/13349/6 "2026-02-09T12:23:48Z")

</div>


