Extracts the part of the string before the year