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. Regular expression to control input range

Regular expression to control input range

Scheduled Pinned Locked Moved C#
regexquestion
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.
  • K Offline
    K Offline
    KASR1
    wrote on last edited by
    #1

    I need to write a regular expression to control the textbox input. Range : 1.00 to 2.00 Please tell me how?

    A OriginalGriffO 2 Replies Last reply
    0
    • K KASR1

      I need to write a regular expression to control the textbox input. Range : 1.00 to 2.00 Please tell me how?

      A Offline
      A Offline
      AspDotNetDev
      wrote on last edited by
      #2

      The first character would be a "1" or "2". The second character would be a period. The third and fourth characters would be "0"-"9".

      [Forum Guidelines]

      1 Reply Last reply
      0
      • K KASR1

        I need to write a regular expression to control the textbox input. Range : 1.00 to 2.00 Please tell me how?

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        1\.\d\d?|1|2\.00?|2 I suggest you get a copy of Expresso[^] if you are going to play with regular expressions - it break them down and helps you design them.

        If Barbie is so popular, why do you have to buy her friends? Eagles may soar, but weasels don't get sucked into jet engines. If at first you don't succeed, destroy all evidence that you tried.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        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