import res = 'stringalading-0.26.0-1'pat = r'\d+\.\d+\.\d+-\d+'print(re.findall(pat, s))
Standard input is empty
['0.26.0-1']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!