Greetings,
I was looking for a regular expression to validate dates in the format dd/mm/yy including leap year validation.
I found a regular expression from http://regexlib.com (see below)
Which I then formatted taking off the start and end tags and also changing \/ which i believe represents a forward slash to / as its not support by xmlspy.
This leaves me with the following :-
However when entering my dd/mm/yy xmlspy points to the / not being valid in my date 01/07/07
Can anyone help me to resolve this?
Thanks
Rob
I was looking for a regular expression to validate dates in the format dd/mm/yy including leap year validation.
I found a regular expression from http://regexlib.com (see below)
Code:
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/(\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/(\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/(\d{2}))|(29\/02\/((0[48]|[2468][048]|[13579][26])|(00))))$
This leaves me with the following :-
Code:
(((0[1-9]|[12]\d|3[01])/(0[13578]|1[02])/(\d{2}))|((0[1-9]|[12]\d|30)/(0[13456789]|1[012])/(\d{2}))|((0[1-9]|1\d|2[0-8])/02/(\d{2}))|(29/02/((0[48]|[2468][048]|[13579][26])|(00))))
Can anyone help me to resolve this?
Thanks
Rob
Comment