News for hackers. Stuff that matters.
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by goto11 on Saturday May 08, 2021 @03:58PM (#27090173)
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by sobellian on Saturday May 08, 2021 @04:23PM (#27090362)
I somewhat disagree that the famous answer is an instance of cargo-culting. Even if not for entertainment it's probably more valuable than literally answering the question posed. Let's say that you now have a method that extracts tags in the manner prescribed... now what? I'd bet the OP was only trying to write that method as a subprocedure for some larger task much more efficiently dealt with another way. In fact if you look at that poster's question history around that time, it's apparent that they were trying to render potentially-malformed XHTML.
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by enriquto on Saturday May 08, 2021 @05:26PM (#27090865)
regardless of cargo-culting or not, the rebuttal explains why the famous answer is utterly wrong: the problem can be solved by regular expressions and it cannot be solved using an xml parser. While the answer is funny and probably good general advice, it is incorrect.
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by avmich on Saturday May 08, 2021 @06:14PM (#27091254)
You can't really argue with a mathematical theorem.
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by goto11 on Sunday May 09, 2021 @05:14AM (#27094470)
But you can argue against someone misunderstanding what a theorem says and applying it in the wrong context.

The question is about tokenization, not parsing.

Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by rblatz on Saturday May 08, 2021 @07:09PM (#27091644)
They aren’t asking to parse all valid xml. They wanted to parse a small known subset. Regex can be an excellent tool in that situation.
Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by dragonwriter on Saturday May 08, 2021 @07:14PM (#27091667)
> They aren’t asking to parse all valid xml. They wanted to parse a small known subset. Regex can be an excellent tool in that situation.

Rarely better than using an existing general XML parser and then validating the additional constraints, especially in terms of implementation and maintenance cost.

Re:ZA̡͊͠͝LGΌ causes "Invalid MD5 checksum on messages" by goto11 on Sunday May 09, 2021 @05:15AM (#27094472)
The question is not about parsing, it is about tokenization.