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
Try This
$time="23:00:00"; preg_match('#^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$#', $time);