I must use regex in order to get the last two digits of a year but only when 4 digits exist. I have the following regex which works perfectly when there is 4 digits. Example 20
Simply match the four digits and capture only the last two.
^\d{2}(\d{2})$
Then reference capturing group #1 to access your match result.
#1