← GalleryDate Validation - Very Complex✨ Emoji Combos/^(?<Monthswith31>31(?<s1>\/|\.|-)(0?[13578]|1[02]|(Jan|Mar|May|Jul|Aug|Oct|Dec))\g<s1>(?<Year>19[0-9][0-9]|200[0-7]))$|^(?<Monthswith29or30>(29|30)(?<s2>\/|\.|-)(0?[1,3-9]|1[0-2]|(Jan|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))\g<s2>(?<Year2>19[0-9][0-9]|200[0-7]))$|^(?<Allmonthswith28>(0?[1-9]|1[0-9]|2[0-8])(?<s3>\/|\.|-)(0?[1-9]|1[0-2]|(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))\g<s3>(?<Year3>19[0-9][0-9]|200[0-7]))$|^(?<FebLeapYears>29(?<s4>\/|\.|-)(0?2|Feb)\g<s4>(19([02468][048]|[13579][26])|200[04]))$/gmPCRE+05 years ago✓ Pre-loaded
About this regex
This complex PCRE regex validates dates between the years 1900 and 2007, ensuring the correct number of days for each month, including leap years. It supports numeric formats (e.g., 01 or 1) and three-letter month abbreviations (e.g., Jan, Feb) using slashes, periods, or hyphens as consistent separators enforced by backreferences. It is useful for validating legacy user inputs or parsing specific log files, though it mistakenly matches February 29th for the year 1900 due to common regex leap year limitations.