Regular Expression Date Validation

Discussion in 'ASP .Net Web Controls' started by Ken, Jun 27, 2003.

  1. Ken

    Ken Guest

    What is the regular expression for a date format of mm/dd/yy? This is the
    closest I have come

    ValidationExpression = "\d{1,2}\/\d{1,2}\/\d{2}"

    The problem is that it is allowing any two digit month, day and year. Should
    I use both the regular expression and the CustomValidator controls with
    script for the date validation?

    Thank you,
    Ken
     
    Ken, Jun 27, 2003
    #1
    1. Advertisements

  2. Ken

    Kenny Guest

    build a calendar control to make your life easier, somemore it is more user
    friendly

    "Ken" <> wrote in message
    news:%23$...
    > What is the regular expression for a date format of mm/dd/yy? This is the
    > closest I have come
    >
    > ValidationExpression = "\d{1,2}\/\d{1,2}\/\d{2}"
    >
    > The problem is that it is allowing any two digit month, day and year.

    Should
    > I use both the regular expression and the CustomValidator controls with
    > script for the date validation?
    >
    > Thank you,
    > Ken
    >
    >
    >
     
    Kenny, Jun 27, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    3
    Views:
    10,185
  2. VSK
    Replies:
    2
    Views:
    2,657
  3. Nazir
    Replies:
    3
    Views:
    5,275
    jayendra gadhavi
    Jan 2, 2008
  4. Cliff Harris

    Help with Regular Expression validation

    Cliff Harris, Apr 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    399
    ra294
    Apr 13, 2004
  5. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,756
    Michael Borgwardt
    May 30, 2004
  6. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    1,077
    Alan Moore
    Dec 2, 2005
  7. GIMME
    Replies:
    3
    Views:
    12,472
    vforvikash
    Dec 29, 2008
  8. Paul Keister

    Regular Expression Date Validation

    Paul Keister, Oct 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    362
    Paul Keister
    Oct 7, 2003
Loading...