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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Validate Time format with AM,PM (Standard time 12 hrs)
Expression
\b(0[0-9]|1[0-1])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\s*(AM|PM|A|P)\b
Description
It will matches the Standard time format that 00:00:00 AM to 11:59:59 PM
Matches
00:00:00 AM | 11:59:59 PM | 10:00:00 AM
Non-Matches
00:00:00 | 11:59:59 | 15:00 PM
Author Rating: Not yet rated. Ajesh Kumar CM
Source
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: problem
Name: Ben
Date: 5/27/2008 12:09:04 PM
Comment:
Does Not do 12:05 AM (that 0-1 should be 0-2) \b(0[0-9]|1[0-2])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\s*(AM|PM|A|P)\b


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