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. The Lounge
  3. Regular Expressions in .NET

Regular Expressions in .NET

Scheduled Pinned Locked Moved The Lounge
helpcsharpdatabaseregextutorial
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.
  • C Offline
    C Offline
    conrado7
    wrote on last edited by
    #1

    Can anyone help me? I`ve just started my adventure with .NET. I want use regular expression in my text box to validate text. For example reg. expression like this : "[0-9][0-9]-[0-9][0-9[0-9]" accepts only for example "43-456" text. What if I enter "54-8f5" ? .NET Regular Expressions tells me that this text is not correct. But it doesn`t tell me which character is invalid. My problem is that I want .NET show me which character (which character index in this incorrect string) is invalid. Can anyone help with this? conrados

    C R 2 Replies Last reply
    0
    • C conrado7

      Can anyone help me? I`ve just started my adventure with .NET. I want use regular expression in my text box to validate text. For example reg. expression like this : "[0-9][0-9]-[0-9][0-9[0-9]" accepts only for example "43-456" text. What if I enter "54-8f5" ? .NET Regular Expressions tells me that this text is not correct. But it doesn`t tell me which character is invalid. My problem is that I want .NET show me which character (which character index in this incorrect string) is invalid. Can anyone help with this? conrados

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      conrado7 wrote:

      Can anyone help me?

      Yes, but not here. You could try one of the programming forums[^].


      My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

      C 1 Reply Last reply
      0
      • C Colin Angus Mackay

        conrado7 wrote:

        Can anyone help me?

        Yes, but not here. You could try one of the programming forums[^].


        My: Blog | Photos "Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious

        C Offline
        C Offline
        conrado7
        wrote on last edited by
        #3

        Thanks :) conrado

        1 Reply Last reply
        0
        • C conrado7

          Can anyone help me? I`ve just started my adventure with .NET. I want use regular expression in my text box to validate text. For example reg. expression like this : "[0-9][0-9]-[0-9][0-9[0-9]" accepts only for example "43-456" text. What if I enter "54-8f5" ? .NET Regular Expressions tells me that this text is not correct. But it doesn`t tell me which character is invalid. My problem is that I want .NET show me which character (which character index in this incorrect string) is invalid. Can anyone help with this? conrados

          R Offline
          R Offline
          Rocky Moore
          wrote on last edited by
          #4

          You might also want to check out: [http://www.codeproject.com/dotnet/expresso.asp](http://
          http://www.codeproject.com/dotnet/expresso.asp)[[^](http://
          http://www.codeproject.com/dotnet/expresso.asp)] I use this all the time! Also you might want to check into: http://www.regular-expressions.info/tutorial.html[^] http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconregularexpressionslanguageelements.asp[^] http://www.devarticles.com/c/a/Java/Regular-Expressions/[^] Rocky <>< Latest Post: Snippet C# Compiler & More.. Blog: www.RockyMoore.com/TheCoder/[^]

          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