Validation

24-Hour Time

Matches time in HH:MM format (24-hour)

/^(?:[01]\d|2[0-3]):[0-5]\d$/

Type in the box above to test if your input matches the regex pattern.

Test Cases

13:45
09:30
23:59
24:00
12:60
9:30

Tags

#time #clock