RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Hosting Spotlight

Sponsors

Regular Expression Details

Title Test Find Time
Expression
^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$
Description
This RE validates times patterns.
Matches
1 AM | 23:00:00 | 5:29:59 PM
Non-Matches
13 PM | 13:60:00 | 00:00:00 AM
Author Rating: The rating for this expression. Michael Ash
Source Michael Ash
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: erer
Name: erer
Date: 1/7/2007 5:02:14 AM
Comment:
ere http://regexlib.com/REDetails.aspx?regexp_id=370&commentId=15014


Title: Web Developer
Name: Ismail Mayat
Date: 7/14/2004 10:48:55 AM
Comment:
Excellent helped alot on regular expression validator in asp.net page where i had a time field text box that needed validation.


Title: Developer
Name: Chiu Kwing
Date: 3/16/2004 2:09:26 AM
Comment:
Very nice. Technically helpful. but it will be nicer if a caption (a large) is provided for each regularexpression


Copyright © 2001-2010, RegexAdvice.com | ASP.NET Tutorials