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.04s 9528KB
stdin
Standard input is empty
stdout
George is working here since
George is working here since