fork download
  1. import re
  2.  
  3. s = 'George -wants to play 123_134 foot-ball in _123pantis FOOTBALL ελλαδα 123'
  4.  
  5. r = re.sub(r'(?:\b(?:\w+(?=-)|\w{2}|\d+|[A-Z]+|\w*[^\x01-\x7F]\w*)\b|-\w+)\s*', '', s).strip()
  6.  
  7. print ('<<{}>>'.format(r))
Success #stdin #stdout 0.03s 9600KB
stdin
Standard input is empty
stdout
<<George play 123_134 _123pantis>>