I need a regular expression to validate credit card expiry date. Note that the format of the \"date\" is MM/YY where YY is the year without century and MM is the month (from
currentDate = new Date()
currenYear = currentDate.getFullYear()
ones_number = currenYear % 10
tens_number = Math.floor(currenYear % 100 / 10)
regrexStr = '^((0[1-9])|(1[0-2]))\/?((' + tens_number + '[' + ones_number + '-9])|([' + (tens_number + 1) + '-9][0-9]))$'
this can run from now on to until the end of the Earth with format MMYY or MM/YY