fork download
  1. import re
  2.  
  3. s = 'ACAABAACAAABACDBADDDFSDDDFFSSSASDAFAAACBAAAFASD'
  4. pattern = r'[B-Z](?=AAA)'
  5. result = re.findall(pattern, s)
  6.  
  7. print(result)
Success #stdin #stdout 0.02s 9508KB
stdin
Standard input is empty
stdout
['C', 'F', 'B']