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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(^|\s|\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:])|(^|\s|\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\s|\)|:|$|\>])){1}){1}){1}){1}
Description
Will match the following date formats: Preceded by a Space, Left-parentheses, or at the beginning of a line. Followed by a Space, Right-parentheses, or Colon(:), word boundary or End of line. Can have / or - as separator. Accepts 2 digit year 00-99 or 4 digit years 1900-2099 (can modify to accept any range)
Matches
01/01/2001 | 01-01-2001: | (1-1-01)
Non-Matches
13/1/2001 | 1-32-2001 | 1-1-1801
Author Rating: The rating for this expression. David Good
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: Mr.
Name: Pedram Nimreezi
Date: 5/5/2003 12:53:28 AM
Comment:
(654(294-7654 and (654-294-7654 is a false positive.


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