Some sort of chemical reaction, between the collected gas, that only reacts with CO2 or hydrogen, is one answer. For example, bubbling the CO2 into a solution of limewater, or through a column of solid NaOH, is one option. Or you can use the reducing power of hydrogen, passing the gas through a tube over a boat of heated metal oxide. Or even cryonics, passing the gas through a cold finger in a liquid nitrogen bath. Very good accuracy may be a problem based on your engineering and technical level. There are other problems, how pure the output of a biological system is -- are you getting no other gases, not even moisture, from your system? Another option, is to get the entire volume sampled, and measuring it for total volume, then just take a small portion of it, sampled at the end, or in small amounts over the day, and run through a gas chromatograph.