Regular Expressions 101

Community Library Entry

0

Regular Expression
Created·2017-09-14 00:52
Flavor·ECMAScript (JavaScript)

/
^(0[1-9]|1[0-2])\/?([0-9]{2})$
/
Open regex in editor

Description

Regex for credit card date validation in the format of MM/YY.

Forked from: https://stackoverflow.com/questions/20430391/regular-expression-to-match-credit-card-expiration-date

Submitted by Me