Test, validate and match regular expressions
Matches date-like strings consisting of 2-4 digits, a separator, 1-2 digits, another separator, and 2-4 digits, capturing the whole thing (e.g., 2023-05-15 or 05\15\23). Intended separators are hyphen or backslash, but the pipe symbol is also accidentally accepted because '|' inside a character class is a literal character, a common regex mistake. Suitable for lenient date extraction or validation, though it doesn't check valid month/day ranges or consistent separators. The 'i' and 's' flags have no practical effect on this pattern.