Great explanation MrC.
I was playing with this very thing a couple of days ago, when trying to remove the junk from the titles of shows recorded with WMC.
I get stuff like Friends_KLRUTV3_08_59_00_13
which treats each one different than other episodes with different dates.
I ended up using the removecharacters expression to remove all of the capital letters, numbers and "_" from the end of the filename (using the ,2 switch).
it took a little playing but I now see all of my recorded shown automatically trimmed down to just the real show name; "Friends" in this case, and it will group them properly now, so clicking on Friends will expand to show all episodes of Friends.
it works well. I had some issues with NOVA, since it was all capital letters also, so I had to add some if() statement to the expression, and use it along with the leftcharacters() expression to get this exception 'fixed' but it's all working great now.
I'll post up details later, but mainly wanted to add that the removecharacters *does* treat capital letters different than lower case, as MrC described.
...so your expression:
([Name], - [Artist],2)
becomes
([Name], - Celtic Christmas, 2)
which is equivalent to:
([Name], - Cacehilmrst, 2)
So it removes any character from the list "- Cacehilmrst" of characters from your track names.
because "- Cacehilmrst" is really just a list of the unique characters from the original.
- Celtic
Chr
is
tma
s ===> ' -Celtichrsma' which becomes ' -Cacehilmrst' (shown alphabetically)
then, as he said, it will remove those letters from then end of the [Name]
I'm not sure where MC decides the 'beginning' and the 'end' are defined.
in other words, in my experience it will remove all the capital letters I entered, even if they show up multiple times, with other letters in between, but not if it's the first letter.
I don't know if there's a "mid-point" that it stops eliminating letters from the 'end'.
Specifically, why does it only remove letters like this, and not all the t's for example. What stops it at the Capital B?
Oh Little Town of Bethlehem - Celtic Christmas ==>
Oh Little Town of B (we see that e,t,h,l, and m were removed as expected)