# A filter expression with wildcards help

**URL:** https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541
**Category:** Support
**Created:** [June 12, 2012, 1:18am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541 "2012-06-12T01:18:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [June 12, 2012, 1:18am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541/1 "2012-06-12T01:18:51Z")

</div>

Hello,

I'm trying to figure out how to properly use a filter expression on file names to fix BPM tags that somehow got messed up on my part. The file names could look like:

{4} - MASTERMIX MASHED UP--X-PRESS 2 VS. GAT DECOR--BPM(131-206)--BITRATE(128)--YEAR(2002)--12INCH(NO).mp3

{4} - MASTERMIX MASHED UP--X-PRESS 2 VS. GAT DECOR--BPM(98-134)--BITRATE(128)--YEAR(2002)--12INCH(NO).mp3

I want the filter expression to only show me files from a loaded directory where the bpm has a "-" present in the file name. Where the first lower bpm could be a double or a triple digit.

I've tried:

%\_filename% HAS BPM(\*\*\*-

%\_filename% HAS BPM(???-

I'm assuming a regular expression can be used with wildcards to search for the "-" but I'm not sure how to work it out.

Can someone provide some guidance? I have the script to correct file name to tags to fix my issues, I just need the filter expression to drill down hundreds of files where only several may have the "-" within the file name itself for correction.

thanks

Chris

---

<div class="post-metadata">

### Author: ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)
#### Post date: [June 12, 2012, 1:40am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541/2 "2012-06-12T01:40:46Z")

</div>

[https://docs.mp3tag.de/filter](https://docs.mp3tag.de/filter)

**MATCHES**   
Returns only files where the content of the tag field named matches against the regular expression . You can use \* to address all fields.

Try this:

%\_filename% MATCHES BPM(\d{2,3}-

---

<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: [June 12, 2012, 1:56am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541/3 "2012-06-12T01:56:08Z")

</div>

> [@kittmaster](#):
>
> I've tried:
> 
> %\_filename% HAS BPM(\*\*\*-
> 
> %\_filename% HAS BPM(???-

You need to use _MATCHES_ as this searches a regular exp in filters. See **_MATCHES_** at [Filtering files and tags (Searching)](https://docs.mp3tag.de/filter) to learn other functions which you may find useful. Theres examples at the bottom of the page.

**YOUR FILTER**

%\_filename% MATCHES "BPM(\d{2,3}-"

---

<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: [June 12, 2012, 1:58am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541/4 "2012-06-12T01:58:06Z")

</div>

> [@JJ Johnson](#):
>
> %\_filename% MATCHES BPM(\d{2,3}-

Was just typing that out and I seen you already replied 😛

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [June 12, 2012, 10:43am UTC](https://community.mp3tag.de/t/a-filter-expression-with-wildcards-help/13541/5 "2012-06-12T10:43:27Z")

</div>

Worked great, thanks guys, I have used the other terms like HAS NOT etc, but this is the first time I had to search a file name this way for files that I have already "fixed" for my naming conventions. I think when I pass over the main filter I use to clean up tags, I forgot to fix part of the tags like I normally do, luckily the file name has the info I use.

For some background to clarify that mess I call a paragraph above, I use Serato, and a lot of songs have transitional BPM's as you can see, but Serato does not show any non number, so I put the remaining bpm into the label field. My master filter cleans up all the tags and nuked anything after the -

Thanks again for helping me out, saves me a lot of time an effort.

Cheers

---

<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/a-filter-expression-with-wildcards-help/13541/6 "2026-02-09T12:23:54Z")

</div>


