From: William Morgan Date: 2005-07-18T09:18:29+09:00 Subject: Re: Parsing DNS zonefiles Excerpts from Dennis Roberts's mail of 14 Jul 2005 (EDT): > Dan could you explain the difference between using regular expressions > and a bonafide parser? In addition to what others have said, if you have to handle ungrammatical files on a regular basis (I do---xml files), I've found it typically easier to write regexp parsers that are robust to ungrammatical input than to try and force a parser to be robust. Also, if you just want one particular bit of information, regexps can be a one-line alternative to a many-line grammar. (There are also theoretical distinctions between the two (parser generators win) but I don't find them all that commonplace in practice.) -- William