Separate the registration from the publication in a given
        string.
        :param reg_pub: A string of digits representing a registration
            and publication.
        :param rules: A list of RegistrantRules which designate where
            to separate the values in the string.
        :returns: A (registrant, publication) tuple of strings.

def _registrant_publication(reg_pub, rules):
        """ Separate the registration from the publication in a given
        string.
        :param reg_pub: A string of digits representing a registration
            and publication.
        :param rules: A list of RegistrantRules which designate where
            to separate the values in the string.
        :returns: A (registrant, publication) tuple of strings.
        """
        for rule in rules:
            if rule.min <= reg_pub <= rule.max:
                reg_len = rule.registrant_length
                break
        else:
            raise Exception('Registrant/Publication not found in registrant '
                            'rule list.')
        registrant, publication = reg_pub[:reg_len], reg_pub[reg_len:]
        return registrant, publication