Title |
Test
Find
Time
|
Expression |
^([0-1]?\d|2[0-3])([:]?[0-5]\d)?([:]?|[0-5]\d)?\s?(A|AM|P|p|a|PM|am|pm|pM|aM|Am|Pm)?$ |
Description |
Its a very flexible time entry regular expression. It can accept all valid combination of time entry |
Matches |
1100 , 1100P,11:30A,11:30,11,11A,11:30AM |
Non-Matches |
11@,abc |
Author |
Rating:
Not yet rated.
Amita
|
Source |
|
Your Rating |
|
Title: Nearly perfect
Name: Saavik
Date: 8/16/2007 1:35:22 AM
Comment:
I am new to RegEx so I was happy to see your entry. Unfortunately, it accepted invalid time entries such as 23:00pm. Hope to see a fix soon - this is the closest I found to a really flexible time validation.
Thanks.
Title: Time Check Vilidation code
Name: Mukul
Date: 8/11/2006 3:51:39 AM
Comment:
time format(hh:mm)
Title: m
Name: m
Date: 8/11/2006 3:50:18 AM
Comment:
time validation
Title: Title
Name: Gautam
Date: 8/8/2006 3:41:44 PM
Comment:
Pretty good.