Quote Originally Posted by Dman View Post
I know how regex works.
I don't think you do. If you did you'd agree with me and everyone esle who calls himself a coder.

Have fun: http://swtch.com/~rsc/regexp/regexp2.html

Quote Originally Posted by Dman View Post
The way DOM parser works is simple but uses lot of memory and is slower.
Sigh. To parse XML/HTML one only needs a simple state machine. Because of that it can be parsed with relatively little code and is much more efficient when compared to the complex finite state machines that make up modern regular expression engines. It requires less CPU cycles than running it trough one or more regular expressions and because of the simplicity of the state machine it uses less memory. Once a DOM is parsed it'll use roughly the same amount of memory as the original string that holds the markup (+ a few KB here and there for the objects).

Every developer that needs to work with HTML or XML will parse it with state machine and not with regular expressions for said reasons.

I'll give you another article: http://www.codinghorror.com/blog/200...hulhu-way.html

Quote Originally Posted by Dman View Post
I find it trivial to waste resources for a simple task such as his. He does not need to extract dynamic data.
Erm, you save resources if you simply parse the HTML the way it should be parsed. You might want to re-read the first post. It's clear that he needs dynamic data.

Quote Originally Posted by Dman View Post
It ain't rocket science either.
Apparently for some it is. You know you're wrong here, why not just say I'm right? It's not gonna make you look stupid or anything. We all learn, including me .

PS: do read those articles.
Hyperz Reviewed by Hyperz on . Extracting data from a string I've extract this from a webpage and stored in a string. ---------------------------------------------------------------------------- ---------------------- <tr height="25"> <td nowrap class="odd" align="center"><img src="/forums/images/icon_topic_new.gif" width=14 height=14 alt='New Topic' border=0></td> <td nowrap class="odd" align="center">&nbsp;</td> Rating: 5