I need to validate a date string in a specific format in Javascript.
The format is: MM/dd/yyyy hh:mm tt
I\'m having a really hard time trying to find either a da
Try this regular expression for the format dd/MM/yyyy hh:mm tt
"[0-3][0-9]\/[0-1][0-9]\/[0-9]{4} [0-1][0-9]:[0-5][0-9] [paPA][Mm]"
the above expression works as the below formats
01/12/9999 01:00 AM - matches
12/31/9999 01:59 PM - no match
39/19/9999 01:59 PM - matches
39/19/9999 99:99 PM - no match (time out of range)
12/31/9999 99:59 PM - no match (hours out of range)