That's not the point - we're talking about theory, not practice. Even if you had infinite time and had a machine that could perform any regex match, no matter how large, it's still not possible. A regular expression cannot hold enough information to express the constraints of HTML. (The real kicker is matching nested tags - it's not possible to enforce that every tag is closed properly if it should be.)
View all comments
Show parent comment
1
u/link23 Sep 09 '17
That's not the point - we're talking about theory, not practice. Even if you had infinite time and had a machine that could perform any regex match, no matter how large, it's still not possible. A regular expression cannot hold enough information to express the constraints of HTML. (The real kicker is matching nested tags - it's not possible to enforce that every tag is closed properly if it should be.)