I have following regex which I found from this website:
Bt somewhere the syntax is incorrect and it throws error:
var myDate = /^(0?[1-9]|1[0-2])\/(0?[1-9]|[12][0-9]|3[01])\/(19|20)[0-9]{2};
Just to be clear:
Date can be anything between 01/01/1900 and 31/12/2099 but format should be strictly:
DD/MM/YYYY
I know there are several solutions on web, all similat but somehow it is throwing javascript error.
Probably syntax mistake because just above that i have put email validation which works fine:
var email = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
/at the end of the regex.Dateobject.