logoalt Hacker News

zelphirkaltyesterday at 10:41 AM1 replyview on HN

PEGs are just soooo much easier to read than regexes for anything more complex than a few words or single line matching. REs are a hammer that tempts people to see everything as a nail, but once one progresses beyond that phase one usually wants as few REs as possible.


Replies

layer8yesterday at 1:40 PM

That’s mostly an artifact of concise regex syntax I believe. When you write regular expressions in an ABNF-like form, they become much more intelligible.