fork download
  1. import re
  2. text = 'I doono if HELLO && AA+-AA should be here but hellllooooo or Whyyy should definitely be. So should ++, x+=-y --- '
  3. rx = re.compile(r'([a-zA-Z])\1{2,}|[^a-zA-Z0-9\s]{3,}')
  4. print( " ".join(x for x in text.split() if not rx.search(x)) )
Success #stdin #stdout 0.03s 9680KB
stdin
Standard input is empty
stdout
I doono if HELLO && AA+-AA should be here but or should definitely be. So should