fork(1) download
  1. import re
  2. regex = r"([ABC]{1,3})(.{0,2})([DEFG])(.{2,3})(V)"
  3. test_str = "AXDXXV"
  4. print(re.match(regex, test_str).groups())
Success #stdin #stdout 0s 23352KB
stdin
Standard input is empty
stdout
('A', 'X', 'D', 'XX', 'V')