fork download
  1. import re
  2. text = "-ac-ac 5-34"
  3. print( re.sub(r'(?<![^\W\d_])-|-(?![^\W\d_])', '.', text) )
Success #stdin #stdout 0.03s 9368KB
stdin
Standard input is empty
stdout
.ac-ac 5.34