Results 1 to 10 of 39
Hybrid View
-
5th Jul 2010, 06:09 PM #1Respected Developer
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
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
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.
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"> </td> Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
extracting data from diffrent site
By zebono2 in forum Web Development AreaReplies: 1Last Post: 28th Jul 2012, 06:22 AM -
C++ string search help needed
By googleplus in forum Web Development AreaReplies: 0Last Post: 12th May 2012, 04:42 PM -
How to recover deleted or lost data, file, photo on Mac with Data Recovery software
By Jack20126 in forum General DiscussionReplies: 0Last Post: 20th Dec 2011, 03:37 AM -
php string - heredoc syntax
By desiboy in forum Web Development AreaReplies: 3Last Post: 16th Nov 2010, 05:15 PM -
[c#] Get String In between strings
By jayfella in forum Web Development AreaReplies: 3Last Post: 16th Jun 2010, 11:23 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...