code: def __parse_domain_to_employer_line(self, raw_domain, raw_org):
          
  
          d = re.match(self.DOMAIN_REGEX, raw_domain, re.UNICODE)
          if not d:
              cause = "invalid domain format: '%s'" % raw_domain
              raise InvalidFormatError(cause=cause)
  
          dom = d.group('domain').strip()
  
          o = re.match(self.ORGANIZATION_REGEX, raw_org, re.UNICODE)
          if not o:
              cause = "invalid organization format: '%s'" % raw_org
              raise InvalidFormatError(cause=cause)
  
          org = o.group('organization').strip()
  
          org = self.__encode(org)
          dom = self.__encode(dom)
  
          return org, dom
docs: Parse domain to employer lines