Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Is RegExp The Best Way to Go?

Is RegExp The Best Way to Go?

Scheduled Pinned Locked Moved C#
htmlcomhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MStanbrook
    wrote on last edited by
    #1

    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

    M E 2 Replies Last reply
    0
    • M MStanbrook

      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

      M Offline
      M Offline
      Martin Haesemeyer
      wrote on last edited by
      #2

      Hi! 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!

      1 Reply Last reply
      0
      • M MStanbrook

        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

        E Offline
        E Offline
        Eric Gunnerson msft
        wrote on last edited by
        #3

        Regex 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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups