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]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0]\d|[1][0-2])(\:[0-5]\d){1,2})*\s*([aApP][mM]{0,2})?$
Description
This is a combination of a few regular expressions found on this site. It allows for a flexible date and time combination, but requires a 12-hour clock (am/pm). Many versions of the am/pm are supported.
Matches
12/31/2002 | 12/31/2002 08:00 | 12/31/2002 08:00 AM
Non-Matches
12/31/02 | 12/31/2002 14:00
Author Rating: Not yet rated. Bill LaPrade
   Displaying page 1 of 1 pages; Items 1 to 1

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