Jump to content

User:Mr Stephen/ISBN code for AWB

From Wikipedia, the free encyclopedia
        public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip)
        {
            Skip = true;
            Summary = "";
            String orig = ArticleText;
            // reference names
            Regex refs = new Regex(@"<ref\s+name\s*=\s*(?<dq>"")?((?(dq)([^""]+)|([^ />]+)))[^>]*>",
                RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled);
            // URLs
            Regex url = new Regex(@"[^/](https?://[^\| }]+)",
                RegexOptions.IgnoreCase | RegexOptions.Compiled);
            //titles
            Regex notTheseParameters = new Regex(@"\b(?:title|desc|doi|wstitle)\s*=\s*([^\|}]+)",
                RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled);
            try
            {
                AWBarticle art = new AWBarticle(ArticleText);
                String pv = awb.StatusLabelText;
                awb.StatusLabelText = pv + " (protecting some text from modification)";
                art.ArticleText = Utility.ProtectPart(art.ArticleText, WikiFunctions.WikiRegexes.PossibleInterwikis, 2);
                art.ArticleText = Utility.ProtectPart(art.ArticleText, url, 1);
                art.ArticleText = Utility.ProtectPart(art.ArticleText, refs, 1);
                art.ArticleText = Utility.ProtectPart(art.ArticleText, WikiFunctions.WikiRegexes.Images, 0);
                art.ArticleText = Utility.ProtectPart(art.ArticleText, notTheseParameters, 1);
                awb.StatusLabelText = pv + " (ISBN)";
                art = ISBNutils.Clean(art);
                art = ISBNutils.WorkOnIt(art);
                awb.StatusLabelText = pv + " (tidying up, returning to AWB)";
                //Convert back to ArticleText, Skip, and Summary.
                art.ArticleText = Utility.ShowProtected(art.ArticleText);
                ArticleText = art.ArticleText;
                Skip = art.Skip;
                Summary = art.Summary;
                awb.StatusLabelText = pv + " (back with AWB)";
            }
            catch
            {
                System.Media.SystemSounds.Exclamation.Play();
                ArticleText = orig;
            }
            return ArticleText;
        }
//=================================================================================//
    class AWBarticle
    {
        // Members: 
        public String ArticleText, Summary;
        public Boolean Skip;
        // Constructor
        public AWBarticle(String text)
        {
            // constructor
            ArticleText = text;
            Skip = true;
            Summary = "";
        }
        public AWBarticle()
        {
            // constructor
            ArticleText = "";
            Skip = true;
            Summary = "";
        }
        // Utility: update summary
        public void UpdateSummary(String textToAdd)
        {
            if (this.Summary.Length != 0)
                this.Summary += ", ";
            this.Summary += textToAdd;
        }
    }
    class Utility
    {
        static private String protectDelimeterStart = "««««", protectDelimeterEnd = "»»»»";
        static private String initVector = "16characterslong", passPhrase = "one", salt = "two";
        static private WikiFunctions.Encryption.EncryptionUtils EncDec = new WikiFunctions.Encryption.EncryptionUtils(initVector, passPhrase, salt);
        static public String ProtectPart(String incoming, Regex CompiledRegex, int groupnumber)
        {
            // this version of ProtectPart takes a compled regex as the second argument
            // and the group to use as the third
            MatchCollection protectMe = CompiledRegex.Matches(incoming);
            foreach (Match singlename in protectMe)
            {
                String entire = singlename.Groups[0].Value;                             // the whole capture
                String part = singlename.Groups[groupnumber].Value;                     // the bit we want to change
                int partStart = singlename.Groups[groupnumber].Index - singlename.Groups[0].Index;                   // start point
                String partEncoded = protectDelimeterStart + EncDec.Encrypt(part) + protectDelimeterEnd;
                String entireWithEncoded = entire.Remove(partStart, part.Length).Insert(partStart, partEncoded);
                incoming = incoming.Replace(entire, entireWithEncoded);
            }
            return incoming;
        }
        static public String ShowProtected(string A)
        {
            MatchCollection protectedParts;
            protectedParts = Regex.Matches(A, protectDelimeterStart + "(.*?)" + protectDelimeterEnd);
            foreach (Match singlename in protectedParts)
            {
                String singlenamePart = singlename.Groups[1].Value;
                A = A.Replace(protectDelimeterStart + singlenamePart + protectDelimeterEnd, EncDec.Decrypt(singlenamePart));
            }
            return A;
        }
        static public String ProtectPartSpecialEnds(String incoming, Regex CompiledRegex, int groupnumber, String frontEnd, String backEnd)
        {
            // This opens up the encode & protect to allow the use of bespoke front and back ends
            MatchCollection protectMe = CompiledRegex.Matches(incoming);
            foreach (Match singlename in protectMe)
            {
                String entire = singlename.Groups[0].Value;                             // the whole capture
                String part = singlename.Groups[groupnumber].Value;                     // the bit we want to change
                int partStart = singlename.Groups[groupnumber].Index - singlename.Groups[0].Index;                   // start point
                String partEncoded = frontEnd + EncDec.Encrypt(part) + backEnd;
                String entireWithEncoded = entire.Remove(partStart, part.Length).Insert(partStart, partEncoded);
                incoming = incoming.Replace(entire, entireWithEncoded);
            }
            return incoming;
        }
        static public String ShowProtectedSpecialEnds(String A, String frontEnd, String backEnd)
        {
            MatchCollection protectedParts;
            protectedParts = Regex.Matches(A, frontEnd + "(.*?)" + backEnd);
            foreach (Match singlename in protectedParts)
            {
                String singlenamePart = singlename.Groups[1].Value;
                A = A.Replace(frontEnd + singlenamePart + backEnd, EncDec.Decrypt(singlenamePart));
            }
            return A;
        }
    }
    class ISBNutils
    {
        // These are the public methods.
        static public AWBarticle Clean(AWBarticle incoming)
        {
            AWBarticle outgoing = incoming;
            String ArticleText = incoming.ArticleText;
            // Basic cleaning.
            // Turn "ISBN =" to "isbn =" in templates starting with "Cit" of "cit"
            // (nested templates will make this fail, but the cite/citation templates should be OK).
            ArticleText = Regex.Replace(ArticleText, "(\\{\\{\\s*[Cc]it[^\\}]*)(ISBN)(\\s*=\\s*)", "$1isbn$3");
            // Turn "id = isbn" into "isbn = "
            // special case: id = ISBN13 or ISBN 13 or ISBN-13 then an isbn that doesn't offend.  This might catch one or two, probably not
            // many, and will fail for wrong-length ISBNs.
            ArticleText = Regex.Replace(ArticleText, "id(\\s*=\\s*)(ISBN[-\\s]{0,1}13\\s*[\\.;:,\\|]{0,1})\\s*((\\d([\\s-]{0,2}\\d){11}[\\s-]{0,2}[\\dxX]))", "isbn$1$3$4");
            // and for ISBN 10 etc
            ArticleText = Regex.Replace(ArticleText, "id(\\s*=\\s*)(ISBN[-\\s]{0,1}10\\s*[\\.;:,\\|]{0,1})\\s*((\\d([\\s-]{0,2}\\d){8}[\\s-]{0,2}[\\dxX]))", "isbn$1$3$4");
            // 'ordinary' id = ISBN
            ArticleText = Regex.Replace(ArticleText, "(id(\\s*=\\s*)(isbn|ISBN)\\s*)", "isbn$2");
            //
            ArticleText = Regex.Replace(ArticleText, "ISBN\\s?[\\.;:,]", "ISBN");
            outgoing.ArticleText = ArticleText;
            return outgoing;
        }
        static public AWBarticle WorkOnIt(AWBarticle incoming)
        {
            // This is the main one.
            AWBarticle outgoing = incoming;
            String originalText = incoming.ArticleText;
            String ArticleText = incoming.ArticleText;
            Boolean looksDashed = false;
            MatchCollection ISBNhits;
            // Make the rules.
            TurnRulesetIntoArrays(out howManyRules, out lowerLimits, out groupLengths, out publisherLengths, out rangeIsGood);
            // First find ISBN outside the citation templates.
            ISBNhits = Regex.Matches(ArticleText, "(ISBN(T|10|-10|13|-13){0,1}\\s*[\\.;:,\\|]{0,1}\\s*)(\\d([\\s-]{0,2}\\d){6,13}[\\s-]{0,2}[\\dxX])");
            foreach (Match oneMatch in ISBNhits)
                WorkOnAMatch(ArticleText, oneMatch.Groups[3].Value, looksDashed, out ArticleText, out looksDashed);
            // Now find isbn= (probably inside templates)
            ISBNhits = Regex.Matches(ArticleText, "(isbn\\s*=\\s*)(\\d([\\s-]{0,2}\\d){6,13}[\\s-]{0,2}[\\dxX])");
            foreach (Match oneMatch in ISBNhits)
                WorkOnAMatch(ArticleText, oneMatch.Groups[2].Value, looksDashed, out ArticleText, out looksDashed);
            if (!looksDashed)
                return incoming;
            if (!String.Equals(originalText, ArticleText))
            {
                outgoing.Skip = false;
                outgoing.UpdateSummary("ISBN format");
                outgoing.ArticleText = ArticleText;
            }
            return outgoing;
        }
        // These are internal variables.
        private static int howManyRules;
        private static UInt64[] lowerLimits;
        private static int[] groupLengths;
        private static int[] publisherLengths;
        private static bool[] rangeIsGood;
        private static UInt64[] mult = new UInt64[] { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000 };
        //private static string IFetchedTheRulesetOn = "July 2012";
        private static string rulesetFromSite()
        {
            String rulesfromwebsite = @"<!DOCTYPE ISBNRangeMessage>
<ISBNRangeMessage>
<MessageSource>
International ISBN Agency
</MessageSource>
<MessageSerialNumber>
d9a3e318-5a7a-4b6c-afea-864b7f8ef3b5
</MessageSerialNumber>
<MessageDate>
Tue, 22 May 2012 10:27:08 GMT
</MessageDate>
<EAN.UCCPrefixes>
<EAN.UCC>
<Prefix>
978
</Prefix>
<Agency>
International ISBN Agency
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-6499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6500000-6999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9989999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9990000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</EAN.UCC>
<EAN.UCC>
<Prefix>
979
</Prefix>
<Agency>
International ISBN Agency
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
1000000-1099999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1100000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</EAN.UCC>
</EAN.UCCPrefixes>
<RegistrationGroups>
<Group>
<Prefix>
978-0
</Prefix>
<Agency>
English language
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
7
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-1
</Prefix>
<Agency>
English language
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-5499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
5500000-8697999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8698000-9989999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9990000-9999999
</Range>
<Length>
7
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-2
</Prefix>
<Agency>
French language
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-3499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
3500000-3999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
4000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8399999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8400000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
7
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-3
</Prefix>
<Agency>
German language
</Agency>
<Rules>
<Rule>
<Range>
0000000-0299999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0300000-0339999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
0340000-0369999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
0370000-0399999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
0400000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9500000-9539999
</Range>
<Length>
7
</Length>
</Rule>
<Rule>
<Range>
9540000-9699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9700000-9899999
</Range>
<Length>
7
</Length>
</Rule>
<Rule>
<Range>
9900000-9949999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9950000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-4
</Prefix>
<Agency>
Japan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
7
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-5
</Prefix>
<Agency>
Russian Federation and former USSR
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4209999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4210000-4299999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4300000-4309999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4310000-4399999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4400000-4409999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4410000-4499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4500000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9099999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9100000-9199999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9200000-9299999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9300000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9500999
</Range>
<Length>
7
</Length>
</Rule>
<Rule>
<Range>
9501000-9799999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9800000-9899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9900000-9909999
</Range>
<Length>
7
</Length>
</Rule>
<Rule>
<Range>
9910000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-600
</Prefix>
<Agency>
Iran
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-601
</Prefix>
<Agency>
Kazakhstan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-602
</Prefix>
<Agency>
Indonesia
</Agency>
<Rules>
<Rule>
<Range>
0000000-1799999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1800000-1899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
1900000-1999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
2000000-7499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7500000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-603
</Prefix>
<Agency>
Saudi Arabia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0500000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-604
</Prefix>
<Agency>
Vietnam
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9799999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9800000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-605
</Prefix>
<Agency>
Turkey
</Agency>
<Rules>
<Rule>
<Range>
0000000-0099999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
0100000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-606
</Prefix>
<Agency>
Romania
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9199999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9200000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-607
</Prefix>
<Agency>
Mexico
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7500000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-608
</Prefix>
<Agency>
Macedonia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4500000-6499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6500000-6999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
1
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-609
</Prefix>
<Agency>
Lithuania
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-611
</Prefix>
<Agency>
Thailand
</Agency>
<Rules>
<Rule>
<Range>
0000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-612
</Prefix>
<Agency>
Peru
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-4499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4500000-4999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
5000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-613
</Prefix>
<Agency>
Mauritius
</Agency>
<Rules>
<Rule>
<Range>
0000000-9999999
</Range>
<Length>
1
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-614
</Prefix>
<Agency>
Lebanon
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-615
</Prefix>
<Agency>
Hungary
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-616
</Prefix>
<Agency>
Thailand
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-617
</Prefix>
<Agency>
Ukraine
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-618
</Prefix>
<Agency>
Greece
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-619
</Prefix>
<Agency>
Bulgaria
</Agency>
<Rules>
<Rule>
<Range>
0000000-1499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1500000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-620
</Prefix>
<Agency>
Mauritius
</Agency>
<Rules>
<Rule>
<Range>
0000000-9999999
</Range>
<Length>
1
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-7
</Prefix>
<Agency>
China, People's Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-80
</Prefix>
<Agency>
Czech Republic and Slovakia
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-81
</Prefix>
<Agency>
India
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-82
</Prefix>
<Agency>
Norway
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-83
</Prefix>
<Agency>
Poland
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-84
</Prefix>
<Agency>
Spain
</Agency>
<Rules>
<Rule>
<Range>
0000000-1399999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1400000-1499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1500000-1999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9199999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9200000-9239999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9240000-9299999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9300000-9499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9500000-9699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-85
</Prefix>
<Agency>
Brazil
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9799999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9800000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-86
</Prefix>
<Agency>
Serbia (shared)
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-87
</Prefix>
<Agency>
Denmark
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
4000000-6499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6500000-6999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8499999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
8500000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9699999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-88
</Prefix>
<Agency>
Italy
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9099999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9100000-9299999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9300000-9499999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-89
</Prefix>
<Agency>
Korea, Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-2499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2500000-5499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5500000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9699999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9700000-9899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-90
</Prefix>
<Agency>
Netherlands
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-6999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8000000-8499999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9099999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9100000-9399999
</Range>
<Length>
6
</Length>
</Rule>
<Rule>
<Range>
9400000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-91
</Prefix>
<Agency>
Sweden
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-6499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6500000-6999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8499999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
8500000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9699999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-92
</Prefix>
<Agency>
International NGO Publishers and EC Organizations
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-93
</Prefix>
<Agency>
India
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-94
</Prefix>
<Agency>
Netherlands
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-950
</Prefix>
<Agency>
Argentina
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-951
</Prefix>
<Agency>
Finland
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-8899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8900000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-952
</Prefix>
<Agency>
Finland
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-5999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6000000-6599999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6600000-6699999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6700000-6999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9899999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-953
</Prefix>
<Agency>
Croatia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-1499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1500000-5099999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5100000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-5999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
6000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-954
</Prefix>
<Agency>
Bulgaria
</Agency>
<Rules>
<Rule>
<Range>
0000000-2899999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2900000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9299999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9300000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-955
</Prefix>
<Agency>
Sri Lanka
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-4499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4500000-4999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
5000000-5499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
5500000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-956
</Prefix>
<Agency>
Chile
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-957
</Prefix>
<Agency>
Taiwan
</Agency>
<Rules>
<Rule>
<Range>
0000000-0299999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0300000-0499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
0500000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-2099999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2100000-2799999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2800000-3099999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
3100000-4399999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4400000-8199999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8200000-9699999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-958
</Prefix>
<Agency>
Colombia
</Agency>
<Rules>
<Rule>
<Range>
0000000-5699999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5700000-5999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
6000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-959
</Prefix>
<Agency>
Cuba
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-960
</Prefix>
<Agency>
Greece
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6600000-6899999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6900000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-9299999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9300000-9399999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9400000-9799999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9800000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-961
</Prefix>
<Agency>
Slovenia
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-962
</Prefix>
<Agency>
Hong Kong, China
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8700000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-963
</Prefix>
<Agency>
Hungary
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-964
</Prefix>
<Agency>
Iran
</Agency>
<Rules>
<Rule>
<Range>
0000000-1499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1500000-2499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2500000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-5499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5500000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9700000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-965
</Prefix>
<Agency>
Israel
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-966
</Prefix>
<Agency>
Ukraine
</Agency>
<Rules>
<Rule>
<Range>
0000000-1299999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1300000-1399999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1400000-1499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1500000-1699999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1700000-1999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2000000-2789999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2790000-2899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2900000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9099999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9100000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9799999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9800000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-967
</Prefix>
<Agency>
Malaysia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0099999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0100000-0999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1000000-1999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
2000000-2999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
3000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-5999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9989999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9990000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-968
</Prefix>
<Agency>
Mexico
</Agency>
<Rules>
<Rule>
<Range>
0100000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-969
</Prefix>
<Agency>
Pakistan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-970
</Prefix>
<Agency>
Mexico
</Agency>
<Rules>
<Rule>
<Range>
0100000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9099999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9100000-9699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-971
</Prefix>
<Agency>
Philippines
</Agency>
<Rules>
<Rule>
<Range>
0000000-0159999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
0160000-0199999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
0200000-0299999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0300000-0599999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
0600000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9099999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9100000-9599999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9600000-9699999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9700000-9899999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-972
</Prefix>
<Agency>
Portugal
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-973
</Prefix>
<Agency>
Romania
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-1699999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1700000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7600000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8900000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-974
</Prefix>
<Agency>
Thailand
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-975
</Prefix>
<Agency>
Turkey
</Agency>
<Rules>
<Rule>
<Range>
0000000-0199999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
0200000-2499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2500000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-9199999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9200000-9899999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-976
</Prefix>
<Agency>
Caribbean Community
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-977
</Prefix>
<Agency>
Egypt
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-6999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-978
</Prefix>
<Agency>
Nigeria
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2000000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-7999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-979
</Prefix>
<Agency>
Indonesia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1000000-1499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1500000-1999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
2000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-980
</Prefix>
<Agency>
Venezuela
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-981
</Prefix>
<Agency>
Singapore
</Agency>
<Rules>
<Rule>
<Range>
0000000-1199999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1200000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-2899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-982
</Prefix>
<Agency>
South Pacific
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9799999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9800000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-983
</Prefix>
<Agency>
Malaysia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0199999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0200000-1999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4000000-4499999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
4500000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-984
</Prefix>
<Agency>
Bangladesh
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-985
</Prefix>
<Agency>
Belarus
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-986
</Prefix>
<Agency>
Taiwan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1199999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1200000-5599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5600000-7999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-987
</Prefix>
<Agency>
Argentina
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-2999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
3000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-988
</Prefix>
<Agency>
Hong Kong, China
</Agency>
<Rules>
<Rule>
<Range>
0000000-1499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1500000-1699999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
1700000-1999999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9699999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-989
</Prefix>
<Agency>
Portugal
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
5
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9927
</Prefix>
<Agency>
Qatar
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-4999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
5000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9928
</Prefix>
<Agency>
Albania
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-4999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
5000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9929
</Prefix>
<Agency>
Guatemala
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9930
</Prefix>
<Agency>
Costa Rica
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-9399999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9400000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9931
</Prefix>
<Agency>
Algeria
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9932
</Prefix>
<Agency>
Lao People's Democratic Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9933
</Prefix>
<Agency>
Syria
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9934
</Prefix>
<Agency>
Latvia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9935
</Prefix>
<Agency>
Iceland
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9936
</Prefix>
<Agency>
Afghanistan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9937
</Prefix>
<Agency>
Nepal
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9938
</Prefix>
<Agency>
Tunisia
</Agency>
<Rules>
<Rule>
<Range>
0000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9939
</Prefix>
<Agency>
Armenia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9940
</Prefix>
<Agency>
Montenegro
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9941
</Prefix>
<Agency>
Georgia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9942
</Prefix>
<Agency>
Ecuador
</Agency>
<Rules>
<Rule>
<Range>
0000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9849999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9850000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9943
</Prefix>
<Agency>
Uzbekistan
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9944
</Prefix>
<Agency>
Turkey
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1000000-4999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5000000-5999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9945
</Prefix>
<Agency>
Dominican Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-0099999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0100000-0799999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
0800000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-5699999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
5700000-5799999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5800000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9946
</Prefix>
<Agency>
Korea, P.D.R.
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9947
</Prefix>
<Agency>
Algeria
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9948
</Prefix>
<Agency>
United Arab Emirates
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9949
</Prefix>
<Agency>
Estonia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9950
</Prefix>
<Agency>
Palestine
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9951
</Prefix>
<Agency>
Kosova
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9952
</Prefix>
<Agency>
Azerbaijan
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9953
</Prefix>
<Agency>
Lebanon
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9954
</Prefix>
<Agency>
Morocco
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9955
</Prefix>
<Agency>
Lithuania
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-9299999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9300000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9956
</Prefix>
<Agency>
Cameroon
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9957
</Prefix>
<Agency>
Jordan
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8500000-8799999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
8800000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9958
</Prefix>
<Agency>
Bosnia and Herzegovina
</Agency>
<Rules>
<Rule>
<Range>
0000000-0399999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0400000-0899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
0900000-0999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1000000-1899999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1900000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9959
</Prefix>
<Agency>
Libya
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9960
</Prefix>
<Agency>
Saudi Arabia
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9961
</Prefix>
<Agency>
Algeria
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9962
</Prefix>
<Agency>
Panama
</Agency>
<Rules>
<Rule>
<Range>
0000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-5599999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
5600000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9963
</Prefix>
<Agency>
Cyprus
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-2499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2500000-2799999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2800000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7349999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7350000-7499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
7500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9964
</Prefix>
<Agency>
Ghana
</Agency>
<Rules>
<Rule>
<Range>
0000000-6999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
7000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9965
</Prefix>
<Agency>
Kazakhstan
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9966
</Prefix>
<Agency>
Kenya
</Agency>
<Rules>
<Rule>
<Range>
0000000-1499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1500000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-7499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
7500000-9599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9600000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9967
</Prefix>
<Agency>
Kyrgyz Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9968
</Prefix>
<Agency>
Costa Rica
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-9399999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9400000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9970
</Prefix>
<Agency>
Uganda
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9971
</Prefix>
<Agency>
Singapore
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9972
</Prefix>
<Agency>
Peru
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-2499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2500000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9973
</Prefix>
<Agency>
Tunisia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0599999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
0600000-0899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
0900000-0999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
1000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9699999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9974
</Prefix>
<Agency>
Uruguay
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7500000-9499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9975
</Prefix>
<Agency>
Moldova
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-4499999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
4500000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9976
</Prefix>
<Agency>
Tanzania
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9977
</Prefix>
<Agency>
Costa Rica
</Agency>
<Rules>
<Rule>
<Range>
0000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9978
</Prefix>
<Agency>
Ecuador
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9979
</Prefix>
<Agency>
Iceland
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-6499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6500000-6599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6600000-7599999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7600000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9980
</Prefix>
<Agency>
Papua New Guinea
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9981
</Prefix>
<Agency>
Morocco
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
1000000-1599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
1600000-1999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9982
</Prefix>
<Agency>
Zambia
</Agency>
<Rules>
<Rule>
<Range>
0000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9983
</Prefix>
<Agency>
Gambia
</Agency>
<Rules>
<Rule>
<Range>
0000000-7999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
8000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9899999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9900000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9984
</Prefix>
<Agency>
Latvia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9985
</Prefix>
<Agency>
Estonia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9986
</Prefix>
<Agency>
Lithuania
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9399999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9400000-9699999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9700000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9987
</Prefix>
<Agency>
Tanzania
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
4000000-8799999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8800000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9988
</Prefix>
<Agency>
Ghana
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5500000-7499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-9989
</Prefix>
<Agency>
Macedonia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-1999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
2000000-2999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9499999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
4
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99901
</Prefix>
<Agency>
Bahrain
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99902
</Prefix>
<Agency>
Gabon
</Agency>
<Rules>
<Rule>
<Range>
0000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99903
</Prefix>
<Agency>
Mauritius
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99904
</Prefix>
<Agency>
Netherlands Antilles and Aruba
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99905
</Prefix>
<Agency>
Bolivia
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99906
</Prefix>
<Agency>
Kuwait
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99908
</Prefix>
<Agency>
Malawi
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99909
</Prefix>
<Agency>
Malta
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99910
</Prefix>
<Agency>
Sierra Leone
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99911
</Prefix>
<Agency>
Lesotho
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99912
</Prefix>
<Agency>
Botswana
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99913
</Prefix>
<Agency>
Andorra
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-3599999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
3600000-5999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
6000000-6049999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6050000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99914
</Prefix>
<Agency>
Suriname
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99915
</Prefix>
<Agency>
Maldives
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99916
</Prefix>
<Agency>
Namibia
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99917
</Prefix>
<Agency>
Brunei Darussalam
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99918
</Prefix>
<Agency>
Faroe Islands
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99919
</Prefix>
<Agency>
Benin
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-3999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
4000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-8499999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
8500000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99920
</Prefix>
<Agency>
Andorra
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99921
</Prefix>
<Agency>
Qatar
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99922
</Prefix>
<Agency>
Guatemala
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99923
</Prefix>
<Agency>
El Salvador
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99924
</Prefix>
<Agency>
Nicaragua
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99925
</Prefix>
<Agency>
Paraguay
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99926
</Prefix>
<Agency>
Honduras
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99927
</Prefix>
<Agency>
Albania
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99928
</Prefix>
<Agency>
Georgia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99929
</Prefix>
<Agency>
Mongolia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99930
</Prefix>
<Agency>
Armenia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99931
</Prefix>
<Agency>
Seychelles
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99932
</Prefix>
<Agency>
Malta
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99933
</Prefix>
<Agency>
Nepal
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99934
</Prefix>
<Agency>
Dominican Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99935
</Prefix>
<Agency>
Haiti
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99936
</Prefix>
<Agency>
Bhutan
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99937
</Prefix>
<Agency>
Macau
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99938
</Prefix>
<Agency>
Srpska, Republic of
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99939
</Prefix>
<Agency>
Guatemala
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99940
</Prefix>
<Agency>
Georgia
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99941
</Prefix>
<Agency>
Armenia
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99942
</Prefix>
<Agency>
Sudan
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99943
</Prefix>
<Agency>
Albania
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99944
</Prefix>
<Agency>
Ethiopia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99945
</Prefix>
<Agency>
Namibia
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99946
</Prefix>
<Agency>
Nepal
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99947
</Prefix>
<Agency>
Tajikistan
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99948
</Prefix>
<Agency>
Eritrea
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99949
</Prefix>
<Agency>
Mauritius
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99950
</Prefix>
<Agency>
Cambodia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99951
</Prefix>
<Agency>
Congo, The Democratic Republic
</Agency>
<Rules>
<Rule>
<Range>
0000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99952
</Prefix>
<Agency>
Mali
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99953
</Prefix>
<Agency>
Paraguay
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9399999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9400000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99954
</Prefix>
<Agency>
Bolivia
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-8799999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8800000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99955
</Prefix>
<Agency>
Srpska, Republic of
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99956
</Prefix>
<Agency>
Albania
</Agency>
<Rules>
<Rule>
<Range>
0000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8599999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8600000-9999999
</Range>
<Length>
2
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99957
</Prefix>
<Agency>
Malta
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99958
</Prefix>
<Agency>
Bahrain
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99959
</Prefix>
<Agency>
Luxembourg
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99960
</Prefix>
<Agency>
Malawi
</Agency>
<Rules>
<Rule>
<Range>
0000000-0999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
1000000-9499999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9500000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99961
</Prefix>
<Agency>
El Salvador
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99962
</Prefix>
<Agency>
Mongolia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99963
</Prefix>
<Agency>
Cambodia
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
5000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99964
</Prefix>
<Agency>
Nicaragua
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99965
</Prefix>
<Agency>
Macau
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99966
</Prefix>
<Agency>
Kuwait
</Agency>
<Rules>
<Rule>
<Range>
0000000-2999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
3000000-6999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
7000000-7999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
8000000-8999999
</Range>
<Length>
0
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99967
</Prefix>
<Agency>
Paraguay
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
2000000-5999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
0
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99968
</Prefix>
<Agency>
Botswana
</Agency>
<Rules>
<Rule>
<Range>
0000000-3999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
4000000-5999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
6000000-8999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
9000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
978-99969
</Prefix>
<Agency>
Oman
</Agency>
<Rules>
<Rule>
<Range>
0000000-4999999
</Range>
<Length>
1
</Length>
</Rule>
<Rule>
<Range>
5000000-7999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
8000000-9999999
</Range>
<Length>
3
</Length>
</Rule>
</Rules>
</Group>
<Group>
<Prefix>
979-10
</Prefix>
<Agency>
France
</Agency>
<Rules>
<Rule>
<Range>
0000000-1999999
</Range>
<Length>
2
</Length>
</Rule>
<Rule>
<Range>
2000000-6999999
</Range>
<Length>
3
</Length>
</Rule>
<Rule>
<Range>
7000000-8999999
</Range>
<Length>
4
</Length>
</Rule>
<Rule>
<Range>
9000000-9759999
</Range>
<Length>
5
</Length>
</Rule>
<Rule>
<Range>
9760000-9999999
</Range>
<Length>
6
</Length>
</Rule>
</Rules>
</Group>
</RegistrationGroups>
</ISBNRangeMessage>
";
            return rulesfromwebsite;
        }
        // These are internal methods.
        private static void WorkOnAMatch(string workingArticleText, string unformattedISBN, bool looksDashedIn, out string newArticleText, out bool looksDashedOut)
        {
            string parsedISBN;
            bool isvalid;
            string errormessage;
            //
            unformattedISBN = unformattedISBN.Trim();
            if (looksDashedIn)
                looksDashedOut = true;
            else
                looksDashedOut = ((unformattedISBN.Contains("-")) || (unformattedISBN.Contains(" ")));
            parsedISBN = CheckAndPutDashesIn(unformattedISBN, out isvalid, out errormessage);
            if (isvalid)
            {
                if (!string.Equals(unformattedISBN, parsedISBN))
                    workingArticleText = Regex.Replace(workingArticleText, unformattedISBN, parsedISBN);
            }
            else
            {
                int STOP1 = 0;
                // if the unformattedISBN is followed by am error message, then skip it
                Match isWarned = Regex.Match(workingArticleText, unformattedISBN + "\\s*({{please|<!--)", RegexOptions.IgnoreCase);
                int stop = 1;
                if (!isWarned.Success)
                    workingArticleText = Regex.Replace(workingArticleText, unformattedISBN, unformattedISBN + " <!--" + errormessage + "-->");
            }
            newArticleText = workingArticleText;
        }
        private static string CheckAndPutDashesIn(string inputString, out bool isvalid, out string errormessage)
        {
            // This is where the parsing should go on.
            bool haveFoundRange = false;
            int lowerlevel = 0, upperlevel = howManyRules - 1;
            UInt64 ISBNasInteger;
            string formattedOutput, workingString, inputStringNoDashes;
            // At this point we should strip out the dashes and spaces from the input string.
            inputStringNoDashes = inputString.Replace(" ", "").Replace("-", "");
            // Check for length
            if ((inputStringNoDashes.Length != 10) && (inputStringNoDashes.Length != 13))
            {
                isvalid = false;
                errormessage = "Not 10 or 13 digits long";
                return inputString;
            }
            // If it's ten digit, add 978 and set tenDigitISBN flag.
            // Replace the last digit ("X" would give problems).
            bool tenDigitISBN = (inputStringNoDashes.Length == 10);
            if (tenDigitISBN)
                workingString = "978" + inputStringNoDashes;
            else workingString = inputStringNoDashes;
            if (workingString[12] == 'x') workingString = workingString.Remove(12).Insert(12, "X");
            ISBNasInteger = Convert.ToUInt64(workingString.Substring(0, 12) + "0");
            // check the checksum
            if (!ValidateChecksum(workingString, tenDigitISBN))
            {
                isvalid = false;
                errormessage = "Bad checksum";
                return inputString;
            }
            // Check if the number is less than 97800... or more than the max allowed
            if (!IsInsideValidRange(ISBNasInteger))
            {
                isvalid = false;
                errormessage = "ISBN too high or low)";
                return inputString;
            }
            // Format dash positioning and check if the range has been allocated.
            while (!haveFoundRange)
            {
                FindRange(ISBNasInteger, upperlevel, lowerlevel, out haveFoundRange, out upperlevel, out lowerlevel);
            }
            // lowerlevel is the index of the range.
            // Check if it the range has been allocated.
            if (!rangeIsGood[lowerlevel])
            {
                isvalid = false;
                errormessage = "Invalid range(range not allocated)";
                return inputString;
            }
            // It looks like we are OK.
            isvalid = true;
            errormessage = "OK";
            //int s1 = 0;
            int l1 = 3;
            int s2 = l1;
            int l2 = groupLengths[lowerlevel];
            int s3 = s2 + l2;
            int l3 = publisherLengths[lowerlevel];
            int s4 = s3 + l3;
            int l4 = 13 - s4 - 1;
            int s5 = 12;
            //int l5 = 1;
            //Console.WriteLine("{0}-{1}-{2}-{3}-{4}",
            //    workingString.Substring(s1, l1),
            //    workingString.Substring(s2, l2),
            //    workingString.Substring(s3, l3),
            //    workingString.Substring(s4, l4),
            //    workingString.Substring(s5, l5));
            //formattedOutput = string.Format("{0}-{1}-{2}-{3}-{4}", inputStringNoDashes.Substring(s1, l1), inputStringNoDashes.Substring(s2, l2), inputStringNoDashes.Substring(s3, l3), inputStringNoDashes.Substring(s4, l4), inputStringNoDashes.Substring(s5, l5));
            formattedOutput = workingString.Insert(s5, "-").Insert(s4, "-").Insert(s3, "-").Insert(s2, "-");
            if (tenDigitISBN)
                return formattedOutput.Substring(4, 13);
            else
                return formattedOutput;
        }
        private static void TurnRulesetIntoArrays(out int howManyRules, out UInt64[] lowerLimits, out int[] groupLengths, out int[] publisherLengths, out bool[] rangeIsGood)
        {
            // Load the rules that were downloaded from the site, extract the rules, and count them.
            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
            System.Xml.XmlNodeList rulesNodes;
            doc.LoadXml(rulesetFromSite());
            rulesNodes = doc.SelectNodes("//Group/Rules/Rule");
            howManyRules = rulesNodes.Count;
            // Make the arrays that will be used for outputs.
            lowerLimits = new UInt64[howManyRules];
            groupLengths = new int[howManyRules];
            publisherLengths = new int[howManyRules];
            rangeIsGood = new bool[howManyRules];
            //
            int index = 0;
            foreach (System.Xml.XmlNode onenode in rulesNodes)
            {
                String prefixString, rangeString, lengthString;
                Int32 length;
                UInt64 oneLowerLimit, front;
                int runninglength = 0;
                rangeString = onenode.SelectSingleNode("./Range").InnerText.Trim();                         // looks like: 0000000-0000000
                lengthString = onenode.SelectSingleNode("./Length").InnerText.Trim();                       // looks like: 3
                prefixString = onenode.SelectSingleNode("./../../Prefix").InnerText.Trim();                 // looks like: 978-0
                length = Convert.ToInt32(lengthString);                                                     // length of publisher field
                runninglength += prefixString.Length - 1;
                oneLowerLimit = Convert.ToUInt64(prefixString.Replace("-", "")) * mult[13 - runninglength];
                if (length > 0)
                {
                    // this for a valid range
                    rangeIsGood[index] = true;
                    front = Convert.ToUInt64(rangeString.Substring(0, length));
                    runninglength += length;
                }
                else
                {
                    // this for an invalid range
                    rangeIsGood[index] = false;
                    if (12 - runninglength > 7)
                    {
                        front = Convert.ToUInt64(rangeString.Substring(0, 7));
                        runninglength += 7;
                    }
                    else
                    {
                        front = Convert.ToUInt64(rangeString.Substring(0, 12 - runninglength));
                        runninglength = 12;
                    }
                }
                oneLowerLimit += front * mult[13 - runninglength];
                // Set the outputs (rangeIsGood has already been set).
                lowerLimits[index] = oneLowerLimit;
                publisherLengths[index] = length;
                groupLengths[index] = (prefixString.Length - 1 - prefixString.IndexOf("-"));
                index++;
            }
        }
        private static void FindRange(UInt64 target, int currentTop, int currentBottom, out bool finished, out int newTop, out int newBottom)
        {
            int lalf;
            if (currentTop - currentBottom == 1)
            {
                finished = true;
                newTop = currentTop;
                newBottom = currentBottom;
            }
            else
            {
                finished = false;
                if ((currentBottom == 0) && (currentTop == howManyRules - 1))
                    lalf = 11;
                else
                    lalf = (int)Math.Floor((double)(currentTop - currentBottom) / 2);
                if (lowerLimits[currentBottom + lalf] > target)
                {
                    newTop = currentBottom + lalf;
                    newBottom = currentBottom;
                }
                else
                {
                    newBottom = currentBottom + lalf;
                    newTop = currentTop;
                }
            }
            //Console.WriteLine("{0} {1}", newBottom, newTop);
        }
        private static bool IsInsideValidRange(UInt64 target)
        {
            // This function makes sure that the target is within the valid limits.
            // This will fail if the ISBN is in the last range.
            if ((target > lowerLimits[0]) && (lowerLimits[howManyRules - 1] > target))
                return true;
            else
                return false;
        }
        private static bool ValidateChecksum(string ISBN, bool tenDigitISBN)
        {
            int cs = 0, CheckSum, GivenCheckSum;
            // we need to convert a given checksum "X" to "10"
            if ((ISBN[ISBN.Length - 1] - 'X') == 0)
                GivenCheckSum = 10;
            else
                GivenCheckSum = ISBN[ISBN.Length - 1] - '0';
            if (tenDigitISBN)                                          // it's isbn-10
            {
                for (int k1 = 1; k1 <= 9; k1++)
                    cs += (ISBN[2 + k1] - '0') * k1;
                CheckSum = cs % 11;
            }
            else                                                      // else it's isbn-13
            {
                for (int k1 = 0; k1 <= 11; k1 += 2)
                    cs += (ISBN[k1] - '0') * 1;
                for (int k1 = 1; k1 <= 11; k1 += 2)
                    cs += (ISBN[k1] - '0') * 3;
                CheckSum = 10 - cs % 10;
                if (CheckSum == 10)
                    CheckSum = 0;
            }
            if (CheckSum != GivenCheckSum) // there's an error, oh shit
                return false;
            else
                return true;
        }
    }