import re test33 = "ID : 11111111 ID2 : 0 "v = re.findall(r'\bID\d*\s*:\s*\d+', test33) print(v)
Standard input is empty
['ID : 11111111', 'ID2 : 0']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!