string = "BoilerRoom_Boiler_Booster_On"
re.sub('(Boiler)_(\d)', r'\1-\2', string)
Because, as the docs say:
Groups are numbered starting with 0. Group 0 is always present; it’s the whole RE
As far why they chose to do it like that, my guess it that Unix tools older than Python's
re module already did it that way.