You can't parse HTML with Regex
Mark Wieder
mwieder at ahsoftware.net
Wed Feb 8 23:12:35 EST 2012
Jacque-
I'm partial to Jeff Atwood's writeup on this
http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html
...including the comments...
--------------
Turing-complete is a stronger computational class than that of a
type-2 grammar (Which is, IIRC, a pushdown automaton - regexs are
nondeterministic finite state machines), so it's not really surprising
that you can parse HTML with regular expressions + glue code in Perl
or whatever, but it's still not really a good idea compared to writing
a proper recursive-descent parser.
JamesP on November 17, 2009 9:05 AM
--------------
You can do whatever you like, even if it seems stupid, but only if you
do it well.
Kapusta on November 17, 2009 9:25 AM
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list