wel, it depends on the capacity of it. so considering that the current is about the same, the battery with a larger capacity will last longer. if you use a normal 9V battery, wich has a capacity of about 100-200mAh, it wil last less then 5V from some rechargable battery. this is a rough theory. but it is more complicated in real then you think, and i might be wrong.
the regulator will maintain 5V as long as it has more then 8V as input. fo while the battery has a voltage >=8V, the current will be constant in the circuit. as for the 5V its voltage will drop from 5->4.9->4.8......and so on and the current will decrease. so it is not that simple to tell. you need more data do determine wich one will last more. you need the voltags(time) graphical curve of the battery and some integrations. also, it depends when you consider the battery discharged completely, wne it has 0V? and another thing, the 7805 is not a passive element so you need some graphics too. because the voltage will remain constant as long as you have a minimum drop of 3V. the probelm could me more simpler if you have a switching power suply. with a constant efficency.