I’m aware of PEGs (lpeg specifically), but couldn’t find a real email parsing example myself, hence the question. Most examples on the internet are as cryptic and noisy as regex imo when it comes to pattern matching, so I thought maybe there are other implementations.
I find PEGs useful for actual CFG parsing, but tbh can’t see why I would avoid regex in favor of it in this case.
[1] https://en.wikipedia.org/wiki/Parsing_expression_grammar
[2] http://www.inf.puc-rio.br/~roberto/lpeg/
[3] https://nim-lang.org/docs/pegs.html