I want regular expression for HH:MM:SS AM/PM here HH must be 1-12 only, MM must 60 min, SS as usual (60 sec.) I any have it properly ...?
If you want to be able to have the zero padding as optional as well as leap seconds:
/^((0?[1-9])|(1[0-2])):[0-5]\d:(([0-5]\d)|(60)) [AP]M$/
The breakdown:
(0?[1-9]|1[0-2])
1-9 (with optional leading zero) or 10-12
[0-5][0-9]
00-59 (0-5 for first digit, 0-9 for second)
([0-5][0-9])|(60)
Leap seconds
[AP]M
AM/PM