well the \w+
you put in matches one or more word characters following a hypen, so that's the expected result. What you want to do is use a lookaround on either side, matching numbers and hyphens that occur between the first hyphen and a period:
re.search(r'(?<=-)[\d-]+(?=\.)', name).group(0)