R.E.M. becomes filename R.E

Hi, I’m new to beets, just imported my music collection and I’m no cleaning up odds and ends.
One thing I can’t figure out:
the band R.E.M. gets a filename of R.E
the band O.A.R. gets a filename of O.A

This is the part of my config file that might affect that, but I get the same results if I remove the line that removes trailing dots. Not sure what else to try?

replace:
‘^…’: ‘’ # strip 3 leading dots
‘[\/]’: ‘’ # strip forward and backslashes
‘^.’: ‘’ # strip leading dots
‘[\x00-\x1f]’: ‘’ # strip control characters
‘:’: ’ -’ # replace : with -
‘[<>"?*|!]’: ‘’ # removes the Windows “reserved characters”
‘…$’: ‘’ # remove trailing 3 dots
‘.$’ : ‘’ # remove trailing dots (Messes with R.E.M. and O.A.R.??)
‘\s+$’: ‘’ # remove trailing whitespace?
‘^\s+’: ‘’ # remove leading whitespace?
‘[]’: ‘’

Hi! I don’t exactly see which rule is to blame, but it seems important to mention that . in a regular expression matches any character—not just actual dot characters. I would first try escaping those (like \. or whatever) and, if that doesn’t work, try “blaming” the appropriate entry by deleting them one by one.

1 Like

Got it - I had this line in my config (backslashes got removed in my initial post here):

‘\…$’: ‘’ # remove trailing 3 dots

which was really removing any “.” followed by 2 more characters
so R.E.M. became R.E

I changed it to

‘\.\.\.$’: ‘’

and it works correctly now.
I should have known better than to copy someone’s code without really looking at it first!

1 Like