code: def __parse_email_to_employer_line(self, raw_email, raw_enrollment):
          
  
          e = re.match(self.EMAIL_ADDRESS_REGEX, raw_email, re.UNICODE)
          if not e and self.email_validation:
              cause = "invalid email format: '%s'" % raw_email
              raise InvalidFormatError(cause=cause)
  
          if self.email_validation:
              email = e.group('email').strip()
          else:
              email = raw_email
  
          r = re.match(self.ENROLLMENT_REGEX, raw_enrollment, re.UNICODE)
          if not r:
              cause = "invalid enrollment format: '%s'" % raw_enrollment
              raise InvalidFormatError(cause=cause)
  
          org = r.group('organization').strip()
          date = r.group('date')
  
          if date:
              try:
                  dt = dateutil.parser.parse(r.group('date'))
              except Exception as e:
                  cause = "invalid date: '%s'" % date
          else:
              dt = MAX_PERIOD_DATE
  
          email = self.__encode(email)
          org = self.__encode(org)
  
          return email, org, dt
docs: Parse email to employer lines