If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Reg Expression for only MM/DD/YYYY

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-15-07, 13:08
MrhelpMe MrhelpMe is offline
Registered User
 
Join Date: Apr 2006
Posts: 140
Red face Reg Expression for only MM/DD/YYYY

I need to create a regular expression for date that works only in the following format. MM/DD/YYYY. Nothing else. I need 2 number for MM 2 Numbers for DD and 4 numbers for YYYY. If the users put's 1 number for month, 1 for day he should get an alert. Also, is this how other users validate there date?


I have this code and thought it was working but it is not. Any help would be great. Thanks

Code:
var RegExPattern = /(\d{1,2})\W(\d{1,2})\W(\d{4})/;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On