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

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

    Join 1,641 other followers

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

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

  1. […] 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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: