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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Validate Time format (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])\b
Description
It will matches the Standard time format that 00:00:00 to 11:59:59
Matches
00:00:00 | 11:59:59 | 10:00:00
Non-Matches
20:00:00 | 10:60:60 | 15:00
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: Shorter Version
Name: Nathon Dalton
Date: 11/17/2010 1:56:21 PM
Comment:
You can accomplish the minutes section by doing this, "([0-5][0-9])", instead of having to list out each possibility like you did in this section, "(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])". Hope that helps. :)


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