Title |
Test
Find
Pattern Title
|
Expression |
(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$) |
Description |
Matches a string if it is a valid time in the format of HH:MM / H:MM / HH / H |
Matches |
10:35 | 9:20 | 23 |
Non-Matches |
24:00 | 20 PM | 20:15 PM |
Author |
Rating:
Nacho Varas
|
Source |
|
Your Rating |
|
Title: How come 0 is valid
Name: Raja Chava
Date: 1/26/2011 5:48:18 PM
Comment:
It says 0 is a valid time. but 00 is invalid. Please fix the 0 case.
Title: it's good, but it does not perfectly what it shoud
Name: Shoto
Date: 5/30/2003 9:23:35 AM
Comment:
try this
(^([0-9]|[0-1][0-9]|[2][0-3])):(([0-5][0-9])$|([0-9])$)