Test, validate and match regular expressions
Matches date strings formatted as YYYY-MM-DD or YYYYY-MM-DD, validating the year (4-5 digits), month (01-12), and day (01-31) separated by dashes. Supports global and multiline matching, making it useful for validating or extracting dates across multiple lines of text.