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 Date Dashes Two Digit Year
Expression
^((((0?[13578])|(1[02]))[\-]?((0?[1-9]|[0-2][0-9])|(3[01])))|(((0?[469])|(11))[\-]?((0?[1-9]|[0-2][0-9])|(30)))|(0?[2][\-]?(0?[1-9]|[0-2][0-9])))[\-]?\d{2}$
Description
I was looking for a date format that allowed 1 or 2 digit Month and Days and 2 digit years. I found and tweak this one based off Cliff Schneide Date example.
Matches
03-25-08|3-25-08|3-1-08
Non-Matches
03-25-2008|3-25-2008|3/25/2008
Author Rating: The rating for this expression. George Goehring
   Displaying page 1 of 1 pages; Items 1 to 1

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