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. Web Development
  3. ASP.NET
  4. Regular Expression

Regular Expression

Scheduled Pinned Locked Moved ASP.NET
regex
3 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.
  • P Offline
    P Offline
    pssuresh
    wrote on last edited by
    #1

    This code always display errormessage "Must be numeric", even though i enter only numbers.Can anyone please reply for this. -- modified at 11:45 Friday 5th May, 2006

    P G 2 Replies Last reply
    0
    • P pssuresh

      This code always display errormessage "Must be numeric", even though i enter only numbers.Can anyone please reply for this. -- modified at 11:45 Friday 5th May, 2006

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      try ^([0-9]*)$

      1 Reply Last reply
      0
      • P pssuresh

        This code always display errormessage "Must be numeric", even though i enter only numbers.Can anyone please reply for this. -- modified at 11:45 Friday 5th May, 2006

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

        You have specified that the field may only contain one digit. If you try to enter a one digit number you will se that it passes. You can use the \d code instead of [0-9]. Specify how many digits you allow, for an example unlimited: "\d+" or 1 to 5: "\d{1,5}". --- b { font-weight: normal; }

        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