Consider using named groups here:

(?P<year>\d{4})

then you can refer to them by names, rather than numbers later.