Filter expressions


This thread collects useful Filter expressions

If you have a useful filter expression, please post it here and give a short description of what it does.

These filter expressions can be used with the Mp3tag filter [F3].

Please look at for the documentation.

-All filter keywords must be uppercase.
-All operations are case insensitive*

Such dateien mit fehlende Tags
Mp3tag Filterausdruck - wie richtig schreiben?
sortierung der listen, per scripte macro function
help with filtering for non standard id3 frames
Entire List of Filter Keywords
mp3tag "frischling" braucht dringend hilfe
Filter - Platzhalter verwenden
Feedback & suggestion
Filter with multiple genres and custom field
Convert Filename > Filename (Blank Spaces)
Mp3tag Linksammlung
Can't Execute Basic Filter

Simple filter

All files without tags:
%_tag% IS ""

Files with flac and ID3v2 tags:
%_tag% HAS "flac id3v2"

Files with mp4 extension
%_extension% IS mp4

All files with a bitrate over 180
%_bitrate% GREATER 180

All files with embedded covers over 20 kbyte
%_cover_size% GREATER 20480


Filter with Scripting

Check if a field is longer than 4 characters:
"$len(%bpm%)" GREATER 4

Files with multipe artist tags:
"$meta_sep(Artist,\\)" HAS \\

Check if two fields have the same value:
"$if($eql(%artist%,%band%),yes,no)" IS yes

Check if the title is part of the filename:
"$ifgreater($strstr(%_filename%,%title%),0,yes,no)" IS yes

Filter Expression Help
comparing id3v1 and id3v2 tags

Filter with Regex (regular expression)

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}]

Full documentation for regex syntax?
Some Regex Issues

Filenames with 2 hyphens
"$len($regexp(%_filename%,'[^-]',))" IS 2

Filenames with at least 2 hyphens
"$len($regexp(%_filename%,'[^-]',))" GREATER 1

Track number is a single digit
track MATCHES ^\d$

Title tag starts with four capital letters
"$if($eql($regexp(%title%,^\u\u\u\u,),%title%),yes,no)" IS no

Suche nach Bindestrich in Tags
Filtering by the no of occurences of a char
Dateien mit bestimmtem Inhalt ausfiltern