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|2][0-9]|[3][0|1])[./-]([0]?[1-9]|[1][0-2])[./-]([0-9]{4}|[0-9]{2})$
Description
Validate brazilian date formats: dd/mm/yyyy or d/m/yy or d.m.yyyy with separators: . - / Valid dates only! d (1-31)/ m (1-12)/ y (0..) (rizzipereira.com.br) For American date format: http://www.regexlib.com/REDetails.aspx?regexp_id=932
Matches
10/03/1979 | 1-1-02 | 01.1.2003
Non-Matches
10/03/197 | 09--02--2004 | 01 02 03
Author Rating: The rating for this expression. Diego dos Santos
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: YES, this match valid dates!
Name: author
Date: 11/20/2004 8:16:13 AM
Comment:
YES, this match valid dates! Blah wrote ... Title: Only checks format, not if date is valid Name: Blah Date: 9/24/2004 12:40:57 PM Comment: Does not check for valid dates, was able to enter 13/15/2004 which is not a valid date.


Title: Only checks format, not if date is valid
Name: Blah
Date: 9/24/2004 12:40:57 PM
Comment:
Does not check for valid dates, was able to enter 13/15/2004 which is not a valid date.


Title: Very simple
Name: Darren Neimke
Date: 10/8/2003 6:23:36 PM
Comment:
Given the previous 2 comments it should be noted that this is indeed a *very* simple pattern that would even match values such as: 99/99.2222


Title: Simple yet precisely right on!
Name: Jimbo
Date: 10/8/2003 1:52:00 PM
Comment:
Thanks for such an easy and simple expression.


Title: Mr.
Name: Pedram Nimreezi
Date: 5/5/2003 1:05:08 AM
Comment:
This one should be raised in rank above the highest.


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