&quot;I don&#x27;t always want to spend insane amounts of time writing full AST parsers.&quot;<p>This is an effect of the language, not the problem space. Backtracking REs make it very easy to write bad code, and then most languages make writing the parsing code hard.<p>If you&#x27;re in a language that makes parsing code easier, like Haskell, then the tradeoff isn&#x27;t anywhere near so bad. I don&#x27;t mention Haskell just because it&#x27;s the trendy thingy, I mention it because parser combinators really do make for some very easy parsers, and while parser combinators can exist in other languages they tend to be very syntactically heavyweight. Perl 6 is supposed to make parsing perhaps even easier, but I haven&#x27;t played with it to know.<p>Parsing isn&#x27;t really that hard, it just plays very poorly with Algol-inspired syntax.<p>To be clear, since this is the Internet and the presumption of disagreement is strong, this post is not an explanation of why you&#x27;re wrong... it&#x27;s an explanation of why you&#x27;re <i>right</i>. It is absolutely a true statement that in most languages you&#x27;re way better off bashing out a dangerous RE than writing a proper parser even for something as simple as this.