The filename isn't the title.
The regular expression you use does not use the correct syntax. It should be \d for digits.
Alos, I am missing the result part. $regexp('stringstuff39_09_21morestuff.mp3',.*(\d\d_\d\d_\d\d).*,$1)
Has a hyphen instead of an underscore, so the pattern does not match.
You could use $regexp('stringstuff39-09-21morestuff.mp3',.*(\d\d.\d\d.\d\d).*,$1)
for all of these files.
My ultimate goal is to parse the filename before 00-00-00 into album, the 00-00-00 (or 00-xx-xx) into comment and everything after into title. Because the whole name is delimited with _, I can't just use filename->tag.
does not have 3 pairs of digits separated by any character but only 2 digits ("52") followed by another string which happens to have something like placeholders in the shape of "-xx-xx".
But those x-ses are no digits.
Right, that's kind of my next problem. At this point I'm wondering if it would be better just to go with a Python program to read the directories and fileglob, but i think MP3Tag is a really capable program and it -almost- seems possible.
I am always a friend of filters - so why don't you filter for
%_filename% HAS -xx-xx
and then treat the files with Format string: $regexp(%_filename%,.*(\d\d-xx-xx).*,$1)
And then you check for files that do not have a comment and the digits
%_filename% MATCHES "\d\d.\d\d.\d\d" AND %comment% MISSING
and treat it with the other regular expression?
I doubt that a python script would do any better if the found pattern is not really clear.
Deleted the previous post as it didn't have a leading 0 but this one does:
I want to parse the filename as
Part before 00-xx-xx : Album (Famous_Fathers)
Part including 00-xx-xx: Comment (41-xx-xx)
Part after 00-xx-xx: Title (24_Fathers_In_The_Household)
Can I do this in one pass, and if not how can I specify those parts? Tag-Tag at least parsed something but Filename-Tag doesn't parse anything, I think because it wants you to tell it %album%%title%%comment% but the duplicate _ delimiter here makes that impossible.
I read the documents but the $regex function at (Replace with Regular Expression – Mp3tag Documentation) didn't offer any examples, if there are examples somewhere of parsing a regex into multiple fields (or doing multiple regexes, etc) I will work on adapting those but right now I can't seem to get started with anything that works.
You can not match _xx_xx if your filename includes -xx-xx
A working regex for exactly this filename: Famous_Fathers_41-xx-xx_24_Fathers_In_The_Household
to get the ALBUM from the _FILENAME would be: $regexp(%_FILENAME%,(.*)_(\d\d-xx-xx)_(.*),$1,1)
To get the COMMENT replace $1 with $2
To get the TITLE replace $1 with $3