Test, validate and match regular expressions
This regex validates dates in dd-mm-yyyy format, including proper handling of leap years for February 29th. It validates that days are appropriate for each month (e.g., 31 only for months with 31 days), and checks leap year rules: years divisible by 4, except century years which must be divisible by 400. The pattern allows optional 19xx or 20xx century prefixes for years.