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. My Regular expression stop at $ sign

My Regular expression stop at $ sign

Scheduled Pinned Locked Moved C#
algorithmsregex
5 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.
  • N Offline
    N Offline
    Naveed727
    wrote on last edited by
    #1

    I am using following string.. Searching text er's community and total budget is $16/page. The regular expression I am using is "[^$]*" but it only get "Searching text er's community and total budget is " not getting the whole string. it means it stop at $ sign what changes I should made to get the whole string. Thanks in advance :)

    P S 2 Replies Last reply
    0
    • N Naveed727

      I am using following string.. Searching text er's community and total budget is $16/page. The regular expression I am using is "[^$]*" but it only get "Searching text er's community and total budget is " not getting the whole string. it means it stop at $ sign what changes I should made to get the whole string. Thanks in advance :)

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

      You told it to take everything up to the first $ and stop there, what did you expect? You want a RegEx to take the whole string you already have? Why?

      N 1 Reply Last reply
      0
      • P PIEBALDconsult

        You told it to take everything up to the first $ and stop there, what did you expect? You want a RegEx to take the whole string you already have? Why?

        N Offline
        N Offline
        Naveed727
        wrote on last edited by
        #3

        Actually this is a part of a big string in which I am searching for something but it stop at $ sign if you resolve this issue then it will helpful for me. Thanks

        P 1 Reply Last reply
        0
        • N Naveed727

          Actually this is a part of a big string in which I am searching for something but it stop at $ sign if you resolve this issue then it will helpful for me. Thanks

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Then more information is required. What is the string, and what part do you want? Are there many strings?

          1 Reply Last reply
          0
          • N Naveed727

            I am using following string.. Searching text er's community and total budget is $16/page. The regular expression I am using is "[^$]*" but it only get "Searching text er's community and total budget is " not getting the whole string. it means it stop at $ sign what changes I should made to get the whole string. Thanks in advance :)

            S Offline
            S Offline
            Shyam K Pananghat
            wrote on last edited by
            #5

            This will just pick up the whole string and stops.. as per your command .. So why do you need this expression then. Please try to undestand some basics of RegeX here. http://www.codeproject.com/KB/dotnet/regextutorial.aspx[^] :) :-D

            Shyam.. My Blog dotnetscoups.blogspot.com

            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