code: def extract_prefix(self, prefix):
          
  
          field = re.match(PREFIX_REG, prefix if prefix else '')
          
          return (prefix,) if not field else field.group(1, 2, 3)
docs: It extracts an irc msg prefix chunk