I want a regexp for matching time in HH:MM format. Here\'s what I have, and it works:
^[0-2][0-3]:[0-5][0-9]$
This matches everything from
You can try the following
^\d{1,2}([:.]?\d{1,2})?([ ]?[a|p]m)?$
It can detect the following patterns :
2300 23:00 4 am 4am 4pm 4 pm 04:30pm 04:30 pm 4:30pm 4:30 pm 04.30pm 04.30 pm 4.30pm 4.30 pm 23:59 0000 00:00