Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have try this but no use.Kindly help
Syntax Error in Regular Expression.

/^[1-9]|1[0-9]|2[0-9]|3[0-1][/ . -][1-9]|0[1-9]|1[0-2][/ . -]1[8][0-9][0-9]|2[0][0-9][0-9]*$/;

/^(0[1-9]|[12][0-9]|3[01])[/ . -](0[1-9]|1[012])[/ . -](19|20)\d\d*/;

C#
var regExpDateofBirth =  /^(0[1-9]|[12][0-9]|3[01])[/ . -](0[1-9]|1[012])[/ . -](19|20)\d\d*/;
       if (!regExpDateofBirth.test($('#txtDOB').val())) {
           alert("Textbox value must be in YY/MM/DD.. Format ");
           return false;
       }

Thanks
Harshal Raut
Posted
Comments
[no name] 24-Jan-14 8:31am    
how to use Regex for dd/mm/yyyy??

1 solution

Try this:
Ask Google[^]
 
Share this answer
 

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