Selective-exhaust gas recirculation for CO2 capture using membrane technology