<story><title>You can&apos;t parse [X]HTML with regex (2009)</title><url>https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454</url></story><parent_chain><item><author>imedadel</author><text>I&amp;#x27;ve seen many people complain about StackOverflow, but this is the best example I&amp;#x27;ve ever encountered.&lt;p&gt;The question: How to match&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;lt;p&amp;gt;
  &amp;lt;a href=&amp;quot;foo&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
The answers: &lt;i&gt;rants about how RegEx is not suitable for parsing entire HTML.&lt;/i&gt;&lt;p&gt;Only the 5th answer starts to actually answer the question.</text></item></parent_chain><comment><author>omginternets</author><text>In all fairness, he does provide hints as to &lt;i&gt;why&lt;/i&gt; regex will not work (namely:  HTML is not a regular grammar).&lt;p&gt;Sure, it&amp;#x27;s somewhat obscured by the humorous rant, but it&amp;#x27;s not that bad an answer, either.&lt;p&gt;More to the point:  I&amp;#x27;m not sure I want to suck the humor out of everything.  I agree that SO has problems, but humor and poetry are worthwhile things in otherewise serious places.  It&amp;#x27;s all about quantity.</text></comment>
<story><title>You can&apos;t parse [X]HTML with regex (2009)</title><url>https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454</url></story><parent_chain><item><author>imedadel</author><text>I&amp;#x27;ve seen many people complain about StackOverflow, but this is the best example I&amp;#x27;ve ever encountered.&lt;p&gt;The question: How to match&lt;p&gt;&lt;pre&gt;&lt;code&gt;  &amp;lt;p&amp;gt;
  &amp;lt;a href=&amp;quot;foo&amp;quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
The answers: &lt;i&gt;rants about how RegEx is not suitable for parsing entire HTML.&lt;/i&gt;&lt;p&gt;Only the 5th answer starts to actually answer the question.</text></item></parent_chain><comment><author>EamonnMR</author><text>I find this type of answer infinitely more paletable than &amp;quot;your question is answered here&amp;quot; or &amp;quot;comments are not for extended discussion, this conversation has been moved to chat&amp;quot;</text></comment>