Regular Expressions Actions

My pet hate is when the Title field is used for all sorts of other random stuff. e.g. Title (Album Version) or Title (2011 Remaster) or other such mostly useless nonsense that the original artist never intended the track to be called.

I'm pretty sure when The Clash did London Calling, they never intended their track to be called London Calling (2011 Remaster) or London Calling (Album Version).

I want to either remove it, or ideally move it to the comment field where is actually belongs.

I started looking a Regex, as it should be pretty each to find the offending tracks (and album titles), but struggling, as I'm not a programmer. I did try one Regex from the current thread: (.+?) and all it did was wipe out the entire Title :frowning: Perhaps I did something wrong? It also didn't seem to be coded to remove trailing whitespace.

The other part of this question is how would I move this stuff to the comment field? Is this something Actions can do?


I would instead use the Guess Values action in this case.

Action: Guess Values
Source: %title%
Guessing Pattern: %title% (%comment%)

But this will overwrite any previous comment if one exists. Maybe filter for those that have a comment first and handle those separately. If only a few you can manually deal with them. Then filter for files without a comment and run the Guess Values action.

So do this at the start before any other processing regex?

Tested it, and it appears to work well. I'm not interesting in keeping existing comments. I could use Subtitle field to store that info, which would keep comments intact, but it's a rarely used field.

If you do it this way, what would be the need for the Regex function? The changes would already be done for you.

Thanks, don't need the regex I couldn't get working. You solved 2 problems in 1 post!!!

1 Like