Is RegExp The Best Way to Go?
-
I'm working on a small app that scrapes some HTML and parses out a few data items. (specifically: I am trying to snag the 2 values for Total CPU Time (4:217:02:06:36) and Ranking (# 2,313) contined in the sniped below)
Total CPU Time (y:d:h:m:s) _(Rank)_ **4:217:02:06:36** _(# 2,313)_
Any suggestions on HOW? I am assuming that a RegExp might be the easiest, but I'm no wizard at creating those (i.e. any suggestions/help would be appreciated). Mike Stanbrook mstanbrook@yahoo.com -
I'm working on a small app that scrapes some HTML and parses out a few data items. (specifically: I am trying to snag the 2 values for Total CPU Time (4:217:02:06:36) and Ranking (# 2,313) contined in the sniped below)
Total CPU Time (y:d:h:m:s) _(Rank)_ **4:217:02:06:36** _(# 2,313)_
Any suggestions on HOW? I am assuming that a RegExp might be the easiest, but I'm no wizard at creating those (i.e. any suggestions/help would be appreciated). Mike Stanbrook mstanbrook@yahoo.comHi! If you are going to use regular expressions the following article by Uwe Keim might help: http://www.codeproject.com/string/re.asp Cheers HTH Martin "Situation normal - all fu***d up" Illuminatus!
-
I'm working on a small app that scrapes some HTML and parses out a few data items. (specifically: I am trying to snag the 2 values for Total CPU Time (4:217:02:06:36) and Ranking (# 2,313) contined in the sniped below)
Total CPU Time (y:d:h:m:s) _(Rank)_ **4:217:02:06:36** _(# 2,313)_
Any suggestions on HOW? I am assuming that a RegExp might be the easiest, but I'm no wizard at creating those (i.e. any suggestions/help would be appreciated). Mike Stanbrook mstanbrook@yahoo.comRegex should be the easiest way to go. You'll want to use something like: Total CPU Time \((?.+?)\) To match the CPU time. I suggest you download this utility: http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=regular expression workbench to play around with them.