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
Mine is:
^(1?[0-9]|2[0-3]):[0-5][0-9]$
This is much shorter
Got it tested with several example
Match:
And doesn't match any invalid instance such as 25:76 etc ...