code: def get_match_value(rexobj, key, index=0):
      '''
      Return a matched value for the key for a specific match from the
      results.
      '''
      if rexobj is None:
          return None
  
      if rexobj.res_count == 0:
          return None
  
      try:
          return rexobj.matches[index].named_groups[key]
      except IndexError:
          return None
      except KeyError:
          return Nonf get_match_value(rexobj, key, index=0):
      '''
      Return a matched value for the key for a specific match from the
      results.
      '''
      if rexobj is None:
          return None
  
      if rexobj.res_count == 0:
          return None
  
      try:
          return rexobj.matches[index].named_groups[key]
      except IndexError:
          return None
      except KeyError:
          return None
docs: Return a matched value for the key for a specific match from the
      results.