Jeremy

I just saw this and thought it very interesting!

Jeremy Ruston wrote
>
> There's an old trope in software that one should never use regexps to 
> parse HTML:
>
> https://blog.codinghorror.c 
> <https://blog.codinghorror.com/parsing-html-the-cthulhu-way/>
> om/parsing-html-the-cthulhu-way/ 
> <https://www.google.com/url?q=https%3A%2F%2Fblog.codinghorror.com%2Fparsing-html-the-cthulhu-way%2F&sa=D&sntz=1&usg=AFQjCNFKa4oy8ekY0ZAOJRqrpyMus15Swg>
>
> So, while I'd be happy to see general regexp support improved in TW5, I 
> don't think it's appropriate to specifically shape that support for the 
> task of parsing HTML.
>
> Of course, TW5 already includes an HTML parser so perhaps the best 
> approach might be to explore how to make that functionality be more 
> usefully exposed to wikitext.
>

I agree that the base parsers are a good way to come at it. Why? Because 
they work with primitive, good, aims. They not try to regex everything. And 
are inside ASTs that give order.

*That said, I think the extent of use of regex under the TW hood is a 
potential revelation to many, and worth understanding more.*

Regarding https://blog.codinghorror.c 
<https://blog.codinghorror.com/parsing-html-the-cthulhu-way/>
om/parsing-html-the-cthulhu-way/ 
<https://www.google.com/url?q=https%3A%2F%2Fblog.codinghorror.com%2Fparsing-html-the-cthulhu-way%2F&sa=D&sntz=1&usg=AFQjCNFKa4oy8ekY0ZAOJRqrpyMus15Swg>,
 
its exaggerated. IMO, its a "straw man" argument about regex. Its got 
points, but way overstated.

A more measured approach is that simple structures can be built quite well 
with regex directly, but its not a tool for complex situations. *Its merely 
a great tool for textual deconstruction and reconstruction*. At that its 
excellent.
 
Best wishes
TT

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/68a12063-b269-4b33-8ea5-d41285170aea%40googlegroups.com.

Reply via email to