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. Regular Expression

Regular Expression

Scheduled Pinned Locked Moved C#
regex
4 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.
  • H Offline
    H Offline
    h s n
    wrote on last edited by
    #1

    Hi everyone! Please tell me what below statement mean Regex regex = new Regex(@"[:_.\w]+\s*=\s*(""[^""]*"")|('[^']*')\s*"); Thanks

    P G 2 Replies Last reply
    0
    • H h s n

      Hi everyone! Please tell me what below statement mean Regex regex = new Regex(@"[:_.\w]+\s*=\s*(""[^""]*"")|('[^']*')\s*"); Thanks

      P Offline
      P Offline
      predakanga
      wrote on last edited by
      #2

      It's a regular expression that matches a string of the form SomeKey = "Some Value" or SomeKey = 'Some Value'. SomeKey can be a string consisting of :, _, . and any alphanumeric character, while Some Value can be a string consisting of anything except the speech marks that contain it. There can also be any amount (or none) of whitespace around the = sign. Hope that helps. -- modified at 12:46 Sunday 21st January, 2007

      H 1 Reply Last reply
      0
      • H h s n

        Hi everyone! Please tell me what below statement mean Regex regex = new Regex(@"[:_.\w]+\s*=\s*(""[^""]*"")|('[^']*')\s*"); Thanks

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        It creates a Regex object with the string as pattern. Regex is short for regular expression, and is used for pattern matching.

        --- Year happy = new Year(2007);

        1 Reply Last reply
        0
        • P predakanga

          It's a regular expression that matches a string of the form SomeKey = "Some Value" or SomeKey = 'Some Value'. SomeKey can be a string consisting of :, _, . and any alphanumeric character, while Some Value can be a string consisting of anything except the speech marks that contain it. There can also be any amount (or none) of whitespace around the = sign. Hope that helps. -- modified at 12:46 Sunday 21st January, 2007

          H Offline
          H Offline
          h s n
          wrote on last edited by
          #4

          Thank you ............ it helped alot

          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