Okay, thanks for your replies.
The article is very helpful.
What I want to do is use a NiMH Racing pack (7.2V), regulate it down to 5V and power a USB jack with it.
I want to use this as a cellphone charger.
Is it a good idea to put an ATtiny behind the regulator and let it check wheter the voltage dropped under 5V and then make an LED indicate the battery level (like discharged and not discharged).
A NiMH battery can hardly be damaged by exhausting it (as opposed to LiPo batteries)
I bought 7805 regulators.(I made a thread for this project as well but I didn't get any replies.)