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

Paging Mr. Regex

Scheduled Pinned Locked Moved C#
regexcsharpcomgame-devquestion
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.
  • A Offline
    A Offline
    afronaut
    wrote on last edited by
    #1

    Hello all. I'm trying to do some tag swapping and having no success. My tags come in the following format: <#data>. The data can be letters, numbers or spaces. My colleague here at work wrote the following: <#([^>])> This seems to match everything fine but I'm using a CodeProject tool called Expresso[^]and the match occurs only for the first character. Is there a way to make it recursively grab all the characters in between tags? I tried this with groups and was very frustrated: <#(?([^>]+)> It still only seems to grab the first character. Thanks in advance... *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";

    W 1 Reply Last reply
    0
    • A afronaut

      Hello all. I'm trying to do some tag swapping and having no success. My tags come in the following format: <#data>. The data can be letters, numbers or spaces. My colleague here at work wrote the following: <#([^>])> This seems to match everything fine but I'm using a CodeProject tool called Expresso[^]and the match occurs only for the first character. Is there a way to make it recursively grab all the characters in between tags? I tried this with groups and was very frustrated: <#(?([^>]+)> It still only seems to grab the first character. Thanks in advance... *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";

      W Offline
      W Offline
      Wjousts
      wrote on last edited by
      #2

      <#([^>])*>

      D 1 Reply Last reply
      0
      • W Wjousts

        <#([^>])*>

        D Offline
        D Offline
        Daniel Turini
        wrote on last edited by
        #3

        or

        <.*?>

        which is simpler.


        Help me dominate the world - click this link and my army will grow

        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