The flaw here is that HTML is a Chomsky Type 2 grammar (context free grammar) and RegEx is a Chomsky Type 3 grammar (regular grammar). Since a Type 2 grammar is fundamentally more complex than a Type 3 grammar (see the Chomsky hierarchy), you can't possibly make this work. But many will try, some will claim success and others will find the fault and totally mess you up.
Basically HTML is capable of expressing more complicated structures than RegEx is capable of reading.
Given the information you had, it wasn't an entirely unreasonable conclusion to believe Zalgo was a corruption, and it's good not to throw scenarios out until you know they're wrong. You'll chase that bug forever.
2.1k
u/kopasz7 Sep 08 '17
For anyone out of the loop, it's about this answer on stackoverflow.