A Regular Expression to match and validate Credit Card Expiration Date in MM/YY format.
/^(0[1-9]|1[0-2])\/?([0-9]{4}|[0-9]{2})$/
Matches:
- 02/22
- 01/25
- 12/26
Non-matches:
- 02/203
- 10/03
- 10/2022
See Also:
- Credit Card Number Regular Expressions
- Regular Expression To Validate Credit/Debit Card Issue Number (Two Digits)
- Regular Expression To Match Credit Card CVV Number