import re first = "6[Sup. 1e+02]" result = re.findall(r"\s+(.*?)\]", first)print result
Standard input is empty
['1e+02']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!