fork(1) download
  1. # -*- coding: utf-8 -*-
  2. import re
  3. s = "characters (in this case, they are áéíóöőúüű)."
  4. res = re.sub(ur'\W+', u' ', s.decode('utf8'), flags=re.UNICODE).encode("utf8")
  5. print(res)
  6.  
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
characters in this case they are áéíóöőúüű