“Credit card number” is one of the patterns that you can select on the Match panel. Use this pattern to match a series of digits that looks like a credit card number from one or more of the world’s major credit card issuers.
This example shows how you can use the “credit card” pattern to look for credit card numbers. You can find this example as “Pattern: credit card number” in the RegexMagic library.
Visa 4123456789012 4123456789012345 412345678901 41234567890123 412345678901234 41234567890123456 MasterCard 5123456789012345 512345678901234 51234567890123455 Discover 6011123456789012 6512345678901234 601112345678901 60111234567890123 American Express 341234567890123 371234567890123 34123456789012 301234567890123 3712345678901234 Diner's Club 30012345678901 30512345678901 36012345678901 36912345678901 38012345678901 38912345678901 30612345678901 37012345678901 JCB 213112345678901 180012345678901 3512345678901234 21311234567890 18001234567890 2131123456789012 1800123456789012 35123456789012 Random 123456789012345
\b(?:4[0-9]{12}(?:[0-9]{3})?|(?:5[1-5][0-9]{2}|2720|27[01][0-9]|2[3-6][0-9]{2}|22[3-9][0-9]|222[1-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35[0-9]{3})[0-9]{11})\b
Unused options: Case sensitive; Exact spacing; Dot doesn’t match line breaks; ^$ don’t match at line breaks; Numbered capture.
Visa 4123456789012 4123456789012345 412345678901 41234567890123 412345678901234 41234567890123456 MasterCard 5123456789012345 512345678901234 51234567890123455 Discover 6011123456789012 6512345678901234 601112345678901 60111234567890123 American Express 341234567890123 371234567890123 34123456789012 301234567890123 3712345678901234 Diner's Club 30012345678901 30512345678901 36012345678901 36912345678901 38012345678901 38912345678901 30612345678901 37012345678901 JCB 213112345678901 180012345678901 3512345678901234 21311234567890 18001234567890 2131123456789012 1800123456789012 35123456789012 Random 123456789012345