Toggle navigation
Regex DB
Search
Notice: This site is currently in beta. It may break at any time, and all URLs are subject to change.
DateTime > Date YYYYMMDD
Favorite
Matches a valid date of the format YYYYMMDD, delimited by /, -, or .
Test with sample data
Normal
Quoted
/^(?:(?:(?:(?:(?:[1-9]\d)(?:0[48]|[2468][048]|[13579][26])|(?:(?:[2468][048]|[13579][26])00))(\/|-|\.)(?:0?2\1(?:29)))|(?:(?:[1-9]\d{3})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[13-9]|1[0-2])\2(?:29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8])))))$/
'/^(?:(?:(?:(?:(?:[1-9]\\d)(?:0[48]|[2468][048]|[13579][26])|(?:(?:[2468][048]|[13579][26])00))(\\/|-|\\.)(?:0?2\\1(?:29)))|(?:(?:[1-9]\\d{3})(\\/|-|\\.)(?:(?:(?:0?[13578]|1[02])\\2(?:31))|(?:(?:0?[13-9]|1[0-2])\\2(?:29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\\2(?:0?[1-9]|1\\d|2[0-8])))))$/'
See Also
DateTime > Date MMDDYYY
Sample Matches
Text
Result
2000-02-29
Group #0
2000-02-29
Group #1
-
match
2004-02-29
Group #0
2004-02-29
Group #1
-
match
2004/02/29
Group #0
2004/02/29
Group #1
/
match
2010-03-15
Group #0
2010-03-15
Group #2
-
match
2005/02/29
no match
2010/03-15
no match
2100-02-29
no match
Categories
[No Folder]
Base64 encoded string (RFC 4648)
Copyright year
Copyright year (html)
CSV
Dice roll spec
Identifier (in C-like programming languages)
LDAP query
SemVer
Vehicle Identification Number (VIN)
Boolean
Boolean value
False value
True value
Credit Card
American Express (advanced)
American Express (simple)
Discover (advanced)
Discover (simple)
MasterCard (advanced)
MasterCard (simple)
Visa (advanced)
Visa (simple)
CSS
CSS class
Hex color
Hex color (6 digit)
hsl()
hsla()
rgb()
rgba()
DateTime
Date MMDDYYY
Date with optional time (ISO 8601)
Date YYYYMMDD
(current)
Day of week
Duration (ISO 8601) - Find
Duration (ISO 8601) - Validate
Leap year
Name of month
Repeating interval (ISO 8601) (R<n>/<start>/<duration>)
Time
Time (00-24)
Time (h:m:s)
Email
Email address (advanced)
Email address (Blink/Chrome)
Email address (Gecko/Firefox)
Email address (PHP)
Email address (RFC 822)
Email address (simple)
Email address (Webkit/Safari)
Email address list
HTML5
Character entity reference
Duration (1d 2m ...)
Duration (ISO 8601)
Global date/time
Local date/time
Month
Time
Timezone offset
Week
Yearless date
ID
ISBN-10
ISBN-13
MAC address (advanced)
MAC address (simple)
SSN (loose)
SSN (strict)
UUID/GUID
UUID/GUID with optional braces
Number
Dollar value
File Size
Floating point
Floating point with exponent
Integer (loose, commas not allowed)
Integer (strict, commas allowed)
Natural number
Real number
Roman numeral
Whole number
Phone
Phone number
Phone number (7+ digits)
Postal Code
Australia
Australia (simple)
Belgium
Brazil
Canada
Canada (simple)
Denmark
France
Germany
Greenland
Italy
Netherlands
Netherlands (simple)
Norway
Spain
Switzerland
UK
UK (simple)
USA
Quoted String
'Single quotes' with backslash escape
'Single quotes' with quote escape
'Single' or "double" quotes with backslash escape
"Double quotes" with backslash escape
"Double quotes" with quote escape
String
Invalid UTF-8 character
Valid UTF-8 string
URL
IPv4 (RFC 3986)
IPv4 (simple)
IPv6 (RFC 2732) v1
IPv6 (RFC 2732) v2
URL encoded string
Valid URL (RFC 3986)
Valid URL (RFC 3986) (Advanced)