DMS technique is useful for selective measurement of benzene, toluene and xylene. The recognition of these substances may be performed in humid air. k-NN classifier is successful in extracting relevant information from DMS spectrum. Spectrum for negative ions have higher discriminative power than for positive ones. The success rate of BTX compounds recognition was 100%.