import retext = '''12.13.14 Here is supposed to start a new line.12.13.15 Here is supposed to start a new line.Here is some text. It is written in one lines. 12.13. Here is some more text. 2.12.14. Here is even more text.''' print(re.sub(r'\s*(\d+(?:\.\d+)+\.?)\s*', r'\n\n\1\n', text))
Standard input is empty
12.13.14 Here is supposed to start a new line. 12.13.15 Here is supposed to start a new line. Here is some text. It is written in one lines. 12.13. Here is some more text. 2.12.14. Here is even more text.
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!