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. regexpression highlight results

regexpression highlight results

Scheduled Pinned Locked Moved C#
regexhelpquestion
2 Posts 2 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.
  • P Offline
    P Offline
    Pyro Joe
    wrote on last edited by
    #1

    ok, I have a simple regular expression: Regex to_find = new Regex(textBox2.Text, System.Text.RegularExpressions.RegexOptions.None); textBox3.Text = to_find.Matches(richTextBox1.Text, 0).Count.ToString(); obviously, it just sends the count of the resulting matches to textBox3. this is good to test regular epxressions, but it doesn't provide any way I can see to format the results (besides the replace option). like for instance, I would like to atleast select the results one at a time (select, not highlight), without using the "find" thing for a richTextBox.find(...). even more though, I would prefer to actually be able to highlight the results in blue or green or something of that sort, rather than just selecting them. where do I find these options for regular expressions? sry I don't know all the big terms for classes or what not. thanks for the help, Stephen P.

    L 1 Reply Last reply
    0
    • P Pyro Joe

      ok, I have a simple regular expression: Regex to_find = new Regex(textBox2.Text, System.Text.RegularExpressions.RegexOptions.None); textBox3.Text = to_find.Matches(richTextBox1.Text, 0).Count.ToString(); obviously, it just sends the count of the resulting matches to textBox3. this is good to test regular epxressions, but it doesn't provide any way I can see to format the results (besides the replace option). like for instance, I would like to atleast select the results one at a time (select, not highlight), without using the "find" thing for a richTextBox.find(...). even more though, I would prefer to actually be able to highlight the results in blue or green or something of that sort, rather than just selecting them. where do I find these options for regular expressions? sry I don't know all the big terms for classes or what not. thanks for the help, Stephen P.

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

      There are many Regex Editors around for .NET just google, I cant remember the names now. xacc-ide 0.0.14 now with C#, MSIL, C, XML, ASP.NET, MyXaml 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