Test, validate and match regular expressions
This regex validates a credit card expiration date in MM/YYYY or MM-YYYY format. It matches a two-digit month (01-12) followed by a slash or hyphen and a four-digit year. Useful for form validation to ensure the expiry date is in the expected format before processing payments.