import retext = "-ac-ac 5-34"print( re.sub(r'(?<![^\W\d_])-|-(?![^\W\d_])', '.', text) )
Standard input is empty
.ac-ac 5.34
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!