Title |
Test
Find
DateTime Regular Expression (regex)
|
Expression |
^((31(?! (FEB|APR|JUN|SEP|NOV)))|((30|29)(?! FEB))|(29(?= FEB (((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8])[./-]((JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC)|([0-9]{2}))[./-]([0-9]{4}|[0-9]{2})((?:$|(?=\x20\d)\x20))?((?:(?:0?[1-9]|1[012])(?::[0-5]\d){0,2}(?:\x20[aApP][mM]))|(?:[01]\d|2[0-3])(?::[0-5]\d){1,2})?$ |
Description |
DateTime Validation:
For case incensitive :
Start with ^(?i:
And End With )$ .
This will not work for javascript but will work for .net (As I am .net guy :)), you can check with other languages also. |
Matches |
31-AUG-13 12:00:10 AM , 31/AUG/2013 12:00:10 AM, 31.AUG.13, 31-08-13 12:00:10 PM, 31/08/13 12:00 etc. |
Non-Matches |
12:00:10 AM |
Author |
Rating:
Not yet rated.
Yasir Ali
|
Source |
http://regexlib.com/ |
Your Rating |
|