I am trying to develop a regex for the filter view or an action that finds audio files with any unwanted character in its tags. Actually, I have a regex which works fine when used in a text editor applied to a text file exported from Mp3tag. However, I can't get my regexes to work in the Mp3tag filter view; thus, I couldn't try to apply them in any action yet.
Computer setup: Mp3tag version 2.70, Windows 7 64-bit
Background: My music library consists of FLAC audio files only (i.e., Vorbis comments as tags). These are being built mostly by dBpoweramp CD Ripper ripping to FLAC, some by dBpoweramp Music Converter operating on SHN files to convert to FLAC. My car stereo (BMW, model year 2014) fortunately can play FLACs from USB stick. However, the car audioplayer somehow is unable to find all audio files on a given stick, neither in its music librarian nor in its directory viewer. Approx. 1-3% of the audio files are missing. Before trying to convince the car manufacturer and its stereo supplier to check their equipment and soft/firmware, I should like to make sure nothing is wrong with my audio files.
One might suspect that unwanted characters sometimes slip through the programs (e.g., dBpoweramp ripper) that gather tags from music databases. Therefore, I should like to develop regexes that would filter my music library for files to those that contain any character in its tags which is not in a set of "allowed characters" per my definition.
In particular, I try to apply either of the following file filter view expressions in Mp3tag:
%title% MATCHES [^a-zA-Z0-9äöüÄÖÜß '"\-,;.:!?&/*#_+()[\]<>]or
%title% MATCHES [^\w '"\-,;.:!?&/*#_+()[\]<>]The first is a more restrictive version of a character class containing my "allowed" characters, while the second one is more general having the \w. Instead of %title%, I might have %album% or %comment% or whatever other tag field.
In Mp3tag, the filter view still shows the entire music library when one of the filters above is applied. I had expected the filter view to be empty in case none of my audio files would contain any unwanted character. I think this behavior of the filter view happens when the regex in the filter is incorrect.
In order to check these regexes, I have exported the relevant tags from my audio files to a text file using the export action of Mp3tag with the predefined export format. Using a text editor (EditPad Pro) on this text file with the regexes above indicates that the regexes work fine. Remark: The regexes have to be appended by \r\n on a Windows system to avoid finding all line breaks, i.e.
[^\w '"\-,;.:!?&/*#_+()[\]<>\r\n]This might function as a workaround for me, but I am interested in why the regexes don't seem to work in Mp3tag as a filter. Of course, I have also tried to employ the appended regexes in Mp3tag in case a tag would contain \r\n.
Thus, my questions are:
- What's wrong with my regexes in the Mp3tag filter?
- Is there any other character to be included in the class of allowed characters (FLAC has Vorbis comments)?
- Maybe more than that, is there anything wrong in Mp3tag itself?
I should also like to say how great a program Mp3tag is ...