Regular Expression To Match A Time (mm:ss) Limited To 60 Minutes

A regular expression to match a time (mm:ss) limited to 60 minutes.

/^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$/

Matches

  • 01:30
  • 1:30
  • 59:59

Non-matches:

  • 60:00
  • 01:3
  • 1:3

See Also: