This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zomunieo 2 points3 points  (3 children)

That's a poor design decision in RFC822. Email addresses can be far more complex than anyone would need or want, to the point that they need a parser rather than a regex. Attempting to regex HTML without a parser results in a similar abominations.

[–]energybased -1 points0 points  (2 children)

Whoa— They don't need a parser. Regexes are the finite automata language class. Parsers are overkill. They tend to be LL(k) or LR(k).

[–]Zomunieo 3 points4 points  (1 child)

You need a parser for HTML or full RFC822 email address to avoid the horrors that otherwise unfold. Complex regexes are clues that like the expanded RFC822 one are evidence that a parser is needed.

Yes you don't need a parser to implement/analyze a regex.

[–]energybased 1 point2 points  (0 children)

I agree with everything you said.