fork download
  1. import re
  2. xmlreplace=re.compile("((?i)[^\w\_\-\.])", re.UNICODE)
  3. print(xmlreplace.sub("-" , "regex test"))
Success #stdin #stdout 0.02s 9944KB
stdin
Standard input is empty
stdout
regex-test