Help with an action to change two-digit years to four-digit years

Can anyone help me with an action that will look at the year, determine if it's four or two digits, and if it's two digits, prepend "19" to those digits. I need four digit years to remain in place unaltered.

I figured out how to write the year to a custom field, prepend the "19" and then write that back to the year field. That doesn't work because my four digit years wind up being six digit years such as "192017".

Any help is appreciated.

Why an action?
That is easily done with a filter
"$len(%year%)" LESS 4
and then by hand for all remaining files in one go.

Just mark all remaining files and add 19 to the year.

Use Replace with regular Expression.

Regexp: (^\d\d$)
With: 19$1

That works perfectly. Thank you. It's just what I was looking for.