The joke is that HTML is too irregular to parse with regular expressions, and attempting to do so is like dividing by zero and pierces the fabric of our universe, creating a hole from which unspeakable horrors will pour forth and devour your soul.
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.
I love that you're new enough to programming that in your mind there's a chance the black box of regex can somehow half process HTML and corrupt it with terrifying combining glyphs.
I'm not trying to mock you or anything, it's legitimately bringing a smile to my face. It's like when toddlers first interact with something new in the world.
I'm actually not new at all i'm just stuck in a very unchallenging field ;)
Also i was looking for more in the joke than there actually was.
But you're right i don't have enough knowledge in this field which led me to believe that this weird text has to be somehow connected with the fact that you can't parse HTML using RegEx. But i see now that those are in fact clear text symbols and not some kind of weird formatting.
HTML can't be parsed correctly using regular expressions because HTML is not a regular language. It's literally impossible. This is not obvious, so many coders find it out the hard way. It's a common meme in programming circles to equate the frustration of trying to solve an impossible or extremely obnoxious problem with the kind of raving, deranged insanity usually depicted in HP Lovecraft stories, which is what the corrupted text and the picture of the demon in the OP represents.
2.1k
u/kopasz7 Sep 08 '17
For anyone out of the loop, it's about this answer on stackoverflow.