Strip out eveything except the year

Hi All

In my Title field I have entries in this format :

1. THE SHADOWS – Quartermasters Stores (Trad. Arr. Shepherd) 1960
2. THE MOONTREKKERS – Night Of the Vampire (LePort) 1961
3. JET HARRIS – Man With The Golden Arm (Bernstein/Fino) 1962
4. TED TAYLOR FOUR – Cats Eyes (James) 1961

I'm trying to make an Action to run through each one and remove everything except the year.

So the above would become

1960
1961
1962
1961

The format is always the same , with the Year at the end.

Can someone advise a method to satisfy this please?

Grateful for any advice.

:slight_smile:

Hello,

if you're sure you want to edit the TITLE tag in such a way, the simplest method would be 'Convert' > 'Tag to Tag' and using

This will return only the last 4 characters in your titles, which you mention are consistently the 4-digit year.

But I advice caution and testing before commiting this conversion on a large scale.

Hi rboss

Many thanks - this does the job perfectly. :slight_smile:

I had in mind an Action , but I can see that Tag->Tag resolves it.

If you plan on making this conversion often, then yes- you can create an Action with it, so you won't have to type out the conversion string everytime.

Happy tagging.


PS: If that reply takes care of your discussion topic, please mark it as the answer, as to help out future readers.

The action equivalent to Convert>Tag-Tag is an action of the type "Format value" for e.g. YEAR. The format string stays the same.

Another suggestion: if you have a varying number of trailing digits and not exactly 4 at the end and if you want to transfer these, then try
Format string: $regexp(%title%,.+?(\d+)$,$1)

Would it not make more sense to strip the YEAR out of your TITLE?
Alternatively, you could move the YEAR into its own field?
Typically, one would split the content of your current title into
TRACK. ARTIST - TITLE YEAR

Thanks guys for your varying solutions. It's all working now! :slight_smile: