import retext = "income,and 4.6 test"text_wo_dots = re.sub(r'(?<!\d)[^\w\s]+(?!\d)',' ',text)print(text_wo_dots)
Standard input is empty
income and 4.6 test
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!