fork download
  1. import re
  2.  
  3. s = "asbshbsbuhb"
  4.  
  5. print(re.findall(r"((.)(?!\2)(.)(?!\2|\3)(.)(?!\2|\3|\4).)", s))
Success #stdin #stdout 0.01s 7096KB
stdin
Standard input is empty
stdout
[('sbuh', 's', 'b', 'u')]