import retext = "-ac-ac"print( re.sub(r'\B-|-\B', '.', text) )
Standard input is empty
.ac-ac
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!