but then how would you sell the electricity from an oil platform?
Onshore, gas is most often flared off when it is associated with gas plants and refineries. The flare essentially serves the same purpose as a safety valve.
Offshore, so-called "associated" gas is flared off because there's no way to recover it without a completely separate pipeline system.
If governments get on this bandwagon, like the enviros would like, all it will accomplish is raising the price of gasoline for your car.
Usually they only flare for a few days to get an idea about how much gas the well will produce. most of the time the gas will be used to power the pump (if needed), if it is an oil well. But it would be impracticle to bring in a generator for a few days and sell electricity...