The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Email Subscription

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 716 other subscribers

The hilarious answer on Stack Overflow in why not to parse html with RegEx

Posted by jpluimers on 2011/02/09

Quite a while ago, user bobince wrote great answer on why not to parse html with RegEx.

Somehow people fail to recognize the brilliance of the answer, and try to simplify it into something like “don’t, use an XML or HTML parser in stead”.

bobince even posted some nice contra-examples that are impossible to  parse in RegEx (heck, even most regular HTML and XML parsers have difficulties with them).

So: enjoy the beauty of the answer while it is still locked for editing.

–jeroen

2 Responses to “The hilarious answer on Stack Overflow in why not to parse html with RegEx”

  1. This is brilliant.

  2. […] I am not a fan of using Regular Expressions for parsing general HTML, the thumbnail frame is generated in a very consistent way, so in this case I don’t mind […]

Leave a Comment

 

Discover more from The Wiert Corner - irregular stream of stuff

Subscribe now to keep reading and get access to the full archive.

Continue reading