a probe for an ir or uv sensor comprising a light emitter and detector is described comprising a lens . the detector detects the spectrums of the emitted light after it has passed a gas to be measured . the sensor of the present invention is especially suitable for such as harsh or aggressive environments measuring the exhaust gasses , for example in ships , vehicles , chimneys etc ., and comprises purge gas protections for delicate optical parts to prevent particles etc . from the exhaust gas depositing on the optics . the sensor further has a flow of sample gas from the gas to be measured being adapted to prevent the purge gas from inferring with the measurements where the sample gas are split into at least two flows where one is adapted for preventing the purge gas from influencing the measurement in a measuring region .