fork download
  1. import re
  2. text = "aaaa-bb-ccc-dd"
  3. print( re.findall(r'(?=\b([A-Z]+-[A-Z]+)\b)', text, re.I) )
Success #stdin #stdout 0.04s 9512KB
stdin
Standard input is empty
stdout
['aaaa-bb', 'bb-ccc', 'ccc-dd']