Title |
Test
Find
Pattern Title
|
Expression |
(0?[1-9]|[12][0-9]|3[01])[/ -](0?[1-9]|1[12])[/ -](19[0-9]{2}|[2][0-9][0-9]{2}) |
Description |
Essa expressão é uma validação de data simplicada onde não aceita datas com ano inferior a 1900. Interessante pra validação de data de idade, data atual, etc |
Matches |
25/11/1979 | 5-12-2004 | 5 2 1901 |
Non-Matches |
25/11/1899 | 9-12-1700 | 25111979 |
Author |
Rating:
Fabiano Santiago
|
Source |
|
Your Rating |
|
Title: October ?
Name: Pazu
Date: 1/31/2015 10:36:09 AM
Comment:
1[012]
Title: Sir
Name: Yves
Date: 11/29/2010 10:00:38 AM
Comment:
Missin caracter 0 in month : (0?[1-9]|1[012])
Title: Não válida nenhuma data com mês = 10
Name: Marcio Rodrigo Pereira
Date: 1/17/2005 7:50:18 AM
Comment:
Da forma como a expressão está, ela não válida nenhuma data cujo o mês seja 10. Uma adequação rápida séria a seguinte:
(0?[1-9]|[12][0-9]|3[01])[/ -](0?[1-9]|1[012])[/ -](19[0-9]{2}|[2][0-9][0-9]{2})
[...]'s
Marcio Rodrigo Pereira
Title: Bug
Name: Paolo
Date: 10/7/2004 5:24:48 AM
Comment:
I think that I've found a bug here.
In fact this regular expression can't match october, because it doesn't match the number '10' for the month.
I have modified this in this way:
(0?[1-9]|[12][0-9]|3[01])[/ -](0?[1-9]|1[012])[/ -](19[0-9]{2}|[2][0-9]{3})
is this exact?
Thanks. Paolo.