A warning about parsing zone files... the grammar is deceptively tricky.<p>While TLD registries will <i>probably</i> provide you with files in a sane subset[0] of that specified in RFC 1035, there are a number of things that will <i>NOT</i> work in general:<p>- Splitting the file in to lines (paren-blocks and quoted strings can span lines, strings can contain &#x27;;&#x27; etc).<p>- Splitting the file on whitespace (it&#x27;s significant in column 1 and inside strings)<p>- Applying a regex (you&#x27;ll need lookahead for conditional matching and it&#x27;ll get ugly fast)<p>Don&#x27;t go down the road of assuming it&#x27;s a simple delimited file.<p>A few references:<p><a href="https:&#x2F;&#x2F;www.nlnetlabs.nl&#x2F;projects&#x2F;nsd&#x2F;documentation.html" rel="nofollow">https:&#x2F;&#x2F;www.nlnetlabs.nl&#x2F;projects&#x2F;nsd&#x2F;documentation.html</a><p><a href="http:&#x2F;&#x2F;www.verycomputer.com&#x2F;96_5ad11cc47053d8b0_1.htm" rel="nofollow">http:&#x2F;&#x2F;www.verycomputer.com&#x2F;96_5ad11cc47053d8b0_1.htm</a><p>[0] See page 9 of <a href="https:&#x2F;&#x2F;archive.icann.org&#x2F;en&#x2F;topics&#x2F;new-gtlds&#x2F;zfa-strategy-paper-12may10-en.pdf" rel="nofollow">https:&#x2F;&#x2F;archive.icann.org&#x2F;en&#x2F;topics&#x2F;new-gtlds&#x2F;zfa-strategy-p...</a>