import retext = "this is a.match\nthis should also match.1234\nand this should 123.match\n\nthis should NOT match. Has space after period\nthis also should NOT match 1.23"print(re.sub(r'\.(?!(?<=\d\.)\d) ?', '. ', text))
Standard input is empty
this is a. match this should also match. 1234 and this should 123. match this should NOT match. Has space after period this also should NOT match 1.23
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!