I have strings of the form Version 1.4.0\\n and Version 1.15.6\\n, and I\'d like a simple way of extracting the three numbers from them. I know I
Version 1.4.0\\n
Version 1.15.6\\n
>>> import re >>> re.findall('(\d+)\.(\d+)\.(\d+)', 'Version 1.15.6\n') [('1', '15', '6')]