12-Hour Time (hh:mm:ss) Regular Expression

A regular expression to match a 12-Hour Time (hh:mm:ss).

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

Date Examples:

  • 12:34:45
  • 10:25:54
  • 09:14:22

See Also: