code: def match_subgroup(sequence, pattern):
      
  
      for element in sequence:
          match = re.match(pattern, element)
  
          if match:
              yield match.groupdict()
docs: Yield the sub-group element dictionary that match a regex pattern.