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. How to catch the text between two boundaries?

How to catch the text between two boundaries?

Scheduled Pinned Locked Moved C#
questionhelptutorial
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.
  • K Offline
    K Offline
    Khoramdin
    wrote on last edited by
    #1

    Hello, I am kind of new with regular expressions. As far as I search over the internet I couldn't find a resonable solution. Suppose I have the following in a string: Word0 word1 word2 word3 word4 word5 word6 word7 word8 word9 How can I capture the following? word4 word5 word6 word7 I would like to catch the text between TWO boundries word4 and word7. I`ve tried a lot of things none of them works. Thank you very much for your help and have a great day. Khoramdin

    M 1 Reply Last reply
    0
    • K Khoramdin

      Hello, I am kind of new with regular expressions. As far as I search over the internet I couldn't find a resonable solution. Suppose I have the following in a string: Word0 word1 word2 word3 word4 word5 word6 word7 word8 word9 How can I capture the following? word4 word5 word6 word7 I would like to catch the text between TWO boundries word4 and word7. I`ve tried a lot of things none of them works. Thank you very much for your help and have a great day. Khoramdin

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      Hi! Something similar to

      .*(word4.*word7).*

      should work.

      Regards, mav -- Black holes are the places where God divided by 0...

      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