Car CO2 regulation measures actual CO2 content from a tailpipe during a test run. It does not make difference is CO2 originated from fossil or biobased fuel. CO2 of electric cars is zero regardless how electricity is produced since there is no tailpipe. Regulation is called "tank-to-wheels" even though life-cycle or "well-to-wheels" CO2 defines climate change effects.
Cars have to meet max 130 gCO2/km on average with NEDC test run until 2020 which is achieved with good fuel economy and fossil fuels. From 2020 limit is 95 gCO2/km, from 2025 about 81 gCO2/km (-15 % compared to 2021) and from 2030 about 59 gCO2/km (-37.5 % compared to 2021). Values force to electrification as the only solution since biofuels are not accepted as tools for reducing cars' CO2. Corresponding regulation exists for vans and is coming for trucks from 2025.
Car regulation is heritage from 1980's when CO2 was a desired outcome from complete combustion and not any pollutant. CO2 was used for comparing fuel efficiency of cars running with fuels having different densities like gasoline, diesel fuel and natural gas. Fuel directives RED and FQD from this millennium recognize "well-to-wheels" approach for mitigating climate change. They also use a principle that CO2 of biofuel's final combustion is zero. So, there is a serious mismatch between fuel and vehicle regulations since vehicle regulations do not at all recognize benefits of biofuels.
Technically and scientifically a proper method would be gCO2/MJ carbon footprint for fuel or energy, and MJ/km energy efficiency for vehicles. Multiplying these together would give well-to-wheels CO2.
Regulation should be updated in order to get cost-effective and technically and commercially neutral solutions since the current one ignores biofuels and defines electrification (or hydrogen) to be the only solution for reducing CO2 of vehicles.