Solved

regularExpressionvalidator for date

Posted on 2006-06-21
2
788 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
Comment Utility
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
Comment Utility
Many thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

13 Experts available now in Live!

Get 1:1 Help Now