Can you provide some examples of why it is hard to parse XML and HTML with a regex? [closed]
Here’s some fun valid XML for you: <!DOCTYPE x [ <!ENTITY y “a]>b”> ]> <x> <a b=”&y;>” /> <![CDATA[[a>b <a>b <a]]> <?x <a> <!– <b> ?> c –> d </x> And this little bundle of joy is valid HTML: <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd” [ <!ENTITY % e “href=”https://stackoverflow.com/questions/701166/hello””> <!ENTITY e “<a … Read more