code: def get_named_group(self, t, i):
          
  
          index = i.index
          value = [t]
          try:
              c = next(i)
              if c != "<":
                  raise SyntaxError("Group missing '<' at %d!" % (i.index - 1))
              value.append(c)
              c = next(i)
              if c in _DIGIT:
                  value.append(c)
                  c = next(i)
                  while c != '>':
                      if c in _DIGIT:
                          value.append(c)
                      c = next(i)
                  value.append(c)
              elif c in _LETTERS_UNDERSCORE:
                  value.append(c)
                  c = next(i)
                  while c != '>':
                      if c in _WORD:
                          value.append(c)
                      c = next(i)
                  value.append(c)
              else:
                  raise SyntaxError("Invalid group character at %d!" % (i.index - 1))
          except StopIteration:
              raise SyntaxError("Unmatched '<' at %d!" % index)
  
          return ''.join(value)
docs: Get group number.