Click here to Skip to main content
15,886,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can anybody help to validate dates(including leap year) using Regex in c#.net

REGARDS
Posted

1 solution

You could use Regex expressions in conjuction with TryParse to get leap year validation.
Validation with Regular Expressions Made Simple[^] describes this approach in the Date validation section.
 
Share this answer
 
Comments
Prashanth.P.Koppal 12-Jan-12 2:38am    
Hi Abhinav,
thanks for ur Reply,
Yes,i hv used the RE which consists of '\/',which is displaying error as 'unrecognized escape sequence'.
Amir Mahfoozi 29-Jan-12 4:27am    
+5
Abhinav S 29-Jan-12 4:29am    
Thank you Amir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900