fork download
  1. import re
  2. regex = r"(?s)([A-G][1-3])((?:(?![A-G][1-3]).)*)"
  3. test_str = """A1 ACBFEKJRQ0Z+-F2.,12STLMGHDF19)(D2!?56WXPC1IONVU43"'E1Y87><A3-=.,'"!?><()@"""
  4. dct = dict(re.findall(regex, test_str))
  5. print(dct)
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
{'F1': '9)(', 'F2': '.,12STLMGHD', 'D2': '!?56WXP', 'A1': ' ACBFEKJRQ0Z+-', 'A3': '-=.,\'"!?><()@', 'C1': 'IONVU43"\'', 'E1': 'Y87><'}