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. Visual Basic
  4. regular expression

regular expression

Scheduled Pinned Locked Moved Visual Basic
regexcsharptutorial
4 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.
  • A Offline
    A Offline
    aldo hexosa
    wrote on last edited by
    #1

    how to remove a string like '............344' from the text here is the sample text: '1. visual basic.net ............344' so the result would be like this: '1. visual basic.net' i am using regular expression in vb.net this is the sample code sText = Regex.Replace(sText, " (\\.+)\\d+", ""); thanx

    C 1 Reply Last reply
    0
    • A aldo hexosa

      how to remove a string like '............344' from the text here is the sample text: '1. visual basic.net ............344' so the result would be like this: '1. visual basic.net' i am using regular expression in vb.net this is the sample code sText = Regex.Replace(sText, " (\\.+)\\d+", ""); thanx

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

      That looks fine to me. Did you test it in Expresso ? You don't actually ask a question, I presume there's a problem with this code ? What is the problem ? If the string is always exactly the same, just use string.Replace.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      A 1 Reply Last reply
      0
      • C Christian Graus

        That looks fine to me. Did you test it in Expresso ? You don't actually ask a question, I presume there's a problem with this code ? What is the problem ? If the string is always exactly the same, just use string.Replace.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        A Offline
        A Offline
        aldo hexosa
        wrote on last edited by
        #3

        it doesnt work

        C 1 Reply Last reply
        0
        • A aldo hexosa

          it doesnt work

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

          It took a week for you to say 'it doesn't work' ? Did you download Expresso ? What does it do ?

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          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