import re s = 'c:\DFT17\BP-550.01.04.159 Proushina_6.7 мм_st3_8sht.DFT'print(re.findall('(\d+[.,]\d*)\s*(mm|мм)', s))
Standard input is empty
[('6.7', 'мм')]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!