Based on http://www.regular-expressions.info/creditcard.html
This example includes test strings.
This only validates the pattern, and not whether the credit card number passes a checksum validation. See the Luhn algorithm for details
https://en.wikipedia.org/wiki/Luhn_algorithm...
Submitted by Steve Piercy - 9 years ago