I\'m allowing users to pick an hour from 00:00:00 to 23:00:00 and need to check if they submit the right format. Is there a regular expression or p
00:00:00
23:00:00
This matches 24 hour time including seconds
([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]
If you only want 00 for minutes and seconds, then
([01]?[0-9]|2[0-3]):00:00