I am trying to match the last occurrence of a persons job end year in Java.
June 1995 – June 2003 (8 years 1 month) would return 2003
1989 – June 1995 (6 years) would return 1995
The information is always in this format so I figured if I start from the end of the string and look for the first 4 digits but I not sure how to do this I know \b\d{4}\b matches the first 4 digits but I require the last occurrence of 4 digits.