What is the right way to verify a credit card with a regex? If which one to use there are tons online. If not how to verify?
I think you're looking for the Luhn Algorithm. It's a simple checksum formula used to validate a variety of identification numbers.