Test, validate and match regular expressions
Validates dates in compact YYYYMMDD format with month-specific day limits: 31 days for Jan/Mar/May/Jul/Aug/Oct/Dec, 30 days for Apr/Jun/Sep/Nov, and 28 days for February. February 29 is allowed only when the year's last two digits are divisible by 4 ([02468][048]|[13579][26]), a simplified leap-year rule. Note it ignores century exceptions (e.g., 1900 isn't a leap year but still matches), so it's best for basic date validation rather than strict calendar accuracy.