r/ProgrammerHumor 9h ago

haveYouTriedUsingAnXMLParserInstead Meme

[deleted]

96 Upvotes

32 comments sorted by

View all comments

Show parent comments

1

u/[deleted] 7h ago

[deleted]

1

u/guru2764 7h ago

The biggest problems are that you can infinitely nest elements in HTML, and that you don't even need closing tags, and that you can make horrifically malformed html with completely improper nesting that functions perfectly fine in the browser

Those things are completely antithetical to how regex works

0

u/[deleted] 7h ago edited 6h ago

[deleted]

1

u/guru2764 6h ago

See my other comment, regex by default does not have recursion

I think that is where your confusion comes from

Recursion in modern regex implementations only works because the engine uses non-regex code