Some clarification of what you're realyy after would be helpful.
A 7805 is a voltage regulator. Input a higher voltage which can be fluctuating between 7 and 10 volts (poorly filtered) and it converts it into 5 volts with a very low fluctuation suitable for digital circuits.
A 7905 does the same thing for negative voltages giving -5V.

