fork download
  1. import re
  2. s='#George . is · working here since 2015.'
  3. print( " ".join(re.sub(r'\s*\d+\.|[^\w\s.#]|_', '', s).split()) )
  4.  
  5. def clean_text(text):
  6. return " ".join(re.sub(r'\s*\d+\.|[^\w\s.#]|_', '', text).split())
  7.  
  8. print( clean_text(s) )
Success #stdin #stdout 0.03s 9536KB
stdin
Standard input is empty
stdout
#George . is working here since
#George . is working here since