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

Regex

Scheduled Pinned Locked Moved C#
regex
7 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
    Angelinna
    wrote on last edited by
    #1

    :confused:How would I write a regular expression of, the set of binary strings NOT containing 01 as a substring Thanks

    C M 2 Replies Last reply
    0
    • A Angelinna

      :confused:How would I write a regular expression of, the set of binary strings NOT containing 01 as a substring Thanks

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I would recommend buying the book 'Mastering Regular Expressions' and downloading the program 'Expresso' to master basic regex.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      1 Reply Last reply
      0
      • A Angelinna

        :confused:How would I write a regular expression of, the set of binary strings NOT containing 01 as a substring Thanks

        M Offline
        M Offline
        Mohammad Dayyan
        wrote on last edited by
        #3

        Try this :

        string result = Regex.Replace(inputString, @"(01)", "");

        A 1 Reply Last reply
        0
        • M Mohammad Dayyan

          Try this :

          string result = Regex.Replace(inputString, @"(01)", "");

          A Offline
          A Offline
          Angelinna
          wrote on last edited by
          #4

          Thanks alot for yr response all. I am actually trying to find just a mere regular expression for a set of binary string that doesn't contain 01 as a substring. I am not doing any coding in a program at the moment.Tried searching on expresso but no clue. :confused:

          M 1 Reply Last reply
          0
          • A Angelinna

            Thanks alot for yr response all. I am actually trying to find just a mere regular expression for a set of binary string that doesn't contain 01 as a substring. I am not doing any coding in a program at the moment.Tried searching on expresso but no clue. :confused:

            M Offline
            M Offline
            Mohammad Dayyan
            wrote on last edited by
            #5

            This site is very useful about Regular Expression . http://www.regular-expressions.info/[^] Did you see it ?

            A 1 Reply Last reply
            0
            • M Mohammad Dayyan

              This site is very useful about Regular Expression . http://www.regular-expressions.info/[^] Did you see it ?

              A Offline
              A Offline
              Angelinna
              wrote on last edited by
              #6

              Yes I did. Thank you very much for the guidance.

              M 1 Reply Last reply
              0
              • A Angelinna

                Yes I did. Thank you very much for the guidance.

                M Offline
                M Offline
                Mohammad Dayyan
                wrote on last edited by
                #7

                You're welcome :)

                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