Solved

regularExpressionvalidator for date

Posted on 2006-06-21
2
789 Views
Last Modified: 2012-05-05
does anyone have custom pattern code for regular Expression validator control to validate date of type  dd/MM/yyyy or dd/MM/yy?

below validates MM/dd/yyyy or MM/dd/yy
^((0?[13578]|10|12)(-|\/)(([0-9])|(0[0-9])|([12])([0-9]?)|(3[01]?))(-|\/)((\d{4})|(\d{2}))|(0?[2469]|11)(-|\/)(([0-9])|(0[0-9])|([12])([0-9]?)|(3[0]?))(-|\/)((\d{4}|\d{2})))$


Thanks
Ugo



0
Comment
Question by:ugougbor
2 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 50 total points
ID: 16953171
http://www.regexlib.com/DisplayPatterns.aspx?cattabindex=4&categoryId=5
Note the very first one does this, as well as some others on the page.

Choose the ones that best suits your needs.
0
 

Author Comment

by:ugougbor
ID: 16968416
Many thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now