import re
date = '24 Jan 2016'
def func(line):
month_regex = re.search('(\d{1,2})\s(Jan(?:uary)?)\s(\d{2,4})', line)
if month_regex:
year = month_regex.group(3)
return year
print(func(date))
aW1wb3J0IHJlCmRhdGUgPSAnMjQgSmFuIDIwMTYnCmRlZiBmdW5jKGxpbmUpOgogICAgbW9udGhfcmVnZXggPSByZS5zZWFyY2goJyhcZHsxLDJ9KVxzKEphbig/OnVhcnkpPylccyhcZHsyLDR9KScsIGxpbmUpCiAgICBpZiBtb250aF9yZWdleDoKICAgICAgICB5ZWFyID0gbW9udGhfcmVnZXguZ3JvdXAoMykKICAgIHJldHVybiB5ZWFyCnByaW50KGZ1bmMoZGF0ZSkp