35V is specified as the "absolute maximum rating", i.e. the LM7805 will not be damaged if you apply this voltage. But if you look at the "electrical characteristics" table, you will find that the output regulation propoerties are only specified for up to 25V input voltage.
For such a large step down in voltage, I would prefer a buck converter which does not convert the excess power into heat. Off the cuff, I don't know one with 35V input voltage range, but I trust you can get them. Google for "step-down converter" or "buck converter". You can get the bare ICs, and also little piggyback modules which come complete with the required passive components. The latter are cheap on ebay, Aliexpress etc., and are convenient for a one-off or a small number of units.