https://stackoverflow.com/a/1732454/2276791
Thinking about parsing HTML with regex? Prepare for pain.
@arm I’ve been wondering how useful it would be to learn how to build a browser from scratch. Most of the material I’ve seen online starts with WebKit, which seems like skipping lots of the fun.
@botox I did that once. Started at webkit, it took like 30 minutes to do the rest with glade and Python. Yeah building the engine would be really challenging.
@botox Haha, I've seen this or something like it. I wonder how hard it would be to write a grammar. I'd imagine that's how the browser does it.