The regular expression rules that match the respective card vendors:
(4\d{12}(?:\d{3})?)
for VISA.(5[1-5]\d{14})
for MasterCard.(3[47]\d{13})
for AMEX.((?:5020|5038|6304|6579|6761)\d{12}(?:\d\d)?)
for Maestro.(3(?:0[0-5]|[68][0-9])[0-9]{11})
for Diners Club.(6(?:011|5[0-9]{2})[0-9]{12})
for Discover.(35[2-8][89]\d\d\d{10})
for JCB.