Validates Credit Card Numbers of different type.
Supports Visa, MasterCard, American Express, Diners Club, Discover and JCB
Taken from http://www.regular-expressions.info/creditcard.html
If you want to support only a particular type, customise it based on following.
^(?:40-9]{12}(?:[0-9]{3})? # Visa
| 5[1-5{14} # MasterCard
| 347{13} # American Express
| 3(?:00-5]|[68)[0-9]{11} # Diners Club
| 6(?:011|5[0-9]{2})[0-9]{12} # Discover
| (?:2131|1800|35\d{3})\d{11} # JCB
)$