24-Hour Time (HH:mm:ss) Regular Expression

A regular expression to match a 24-Hour Time (HH:mm:ss).

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

Date Examples:

  • 23:34:45
  • 02:25:54
  • 00:14:22

See Also: