import re regex = r"F\((\d+),(\d+)\) = (\d+(?:\.\d+)?)"s = "F(1,110) = 15.18"print(re.findall(regex, s))
Standard input is empty
[('1', '110', '15.18')]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!