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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ [AaPp][Mm]))$
Description
This is a simple expression used to match a normal 12 hour clock, requires AM/PM in any or mixed case and requires a space before the AM or PM and minutes are required.
Matches
1:45 am | 12:01 aM | 01:23 pm
Non-Matches
13:34 am | 1:60 am | 13:45
Author Rating: The rating for this expression. HaL Gottfried
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

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