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

Regex question

Scheduled Pinned Locked Moved C#
questionalgorithmsregexlounge
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.
  • E Offline
    E Offline
    ektoras
    wrote on last edited by
    #1

    In general when I know exactly the keywords(about 300) I want to find should I use something like: 1)Regex(@"if|do|for|while|int|Int32|Int64...(about 300)") or 2)Regex(@"[_A-Za-z]+[A-Za-z]\w*] and follows searching in a hashtable?

    D L 2 Replies Last reply
    0
    • E ektoras

      In general when I know exactly the keywords(about 300) I want to find should I use something like: 1)Regex(@"if|do|for|while|int|Int32|Int64...(about 300)") or 2)Regex(@"[_A-Za-z]+[A-Za-z]\w*] and follows searching in a hashtable?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Option 2 would be preferable, speed and maintainability are the biggest benefits. Option 1 is simply out of the question. That's just a nightmare waiting to bite you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      • E ektoras

        In general when I know exactly the keywords(about 300) I want to find should I use something like: 1)Regex(@"if|do|for|while|int|Int32|Int64...(about 300)") or 2)Regex(@"[_A-Za-z]+[A-Za-z]\w*] and follows searching in a hashtable?

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        I tried to paste a single Regex solution using groups, but the post somehow crashed the forum..:^) xacc-ide 0.0.12 now with C#, MSIL, C, XML, ASP.NET and HLSL coloring - Screenshots

        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