/^\\d{1,2}[:][0-5][0-9]$/
is what I have. this limits minutes to 00-59. It does not, however, limit hours to between 0 and 12. For similarity and unifo
The 0 - 9 and 10 - 12 cases need to be treated separately. (The two rules can be combined with |.)
|
/^(?:0?\d|1[012]):[0-5]\d$/
Here
(?:…)
x|y
0?\d
1[012]