Dinker Batra

Dinker Batra

  • NA
  • 5
  • 15.2k

Date Regular Expression for Leap Year Date Validatation

Dec 18 2008 6:50 AM

Hello Friends

I am using ASP.Net Textbox for date input. I want to validate the date. For this i am using Regular Expression. The validate expression is;

ValidationExpression=”^(d{0}|(31(?!(Feb|feb|Apr|apr|Jun|jun|Sep|
sep|Nov|nov)))|((30|29)(?!Feb|feb))|(29(?=Feb|feb(((1[6-9]|[2-9]\
d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00
)))))|(29(?=Feb|feb(((0[48]|[2468][048]|[13579]
[26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8])[- ](Jan|jan|feb|Feb|mar|Mar|may|May|apr|Apr|jul|Jul|Jun|jun|Aug|aug|
Oct|oct|Sep|sep|Nov|nov|dec|Dec)[- ]((1[6-9]|[2-9]\d)\d{2}|\d{2}|d{0})$”

But its not working properlly.


Answers (1)