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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)
Description
Validate “Time” Data to Work with SQL Server This is a fix (I hope) for a problem with the original expression. It originally allowed any combination of am or pm. For example: ma, aa, mm, mp, etc.
Matches
8am | 8 am | 8:00 am
Non-Matches
8a | 8 a | 8:00 a
Author Rating: Not yet rated. Greg Burns
   Displaying page 1 of 1 pages; Items 1 to 1

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