fork(3) download
  1. import re
  2.  
  3. def junk_to_alpha(s):
  4. s = re.sub(r"\s*[^A-Za-z]+\s*", " ", s)
  5. return s
  6.  
  7. print junk_to_alpha("Spoons! 12? \/@# ,.1 12 Yeah? {[]}")
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
Spoons Yeah