Skip to content

Instantly share code, notes, and snippets.

View Chewbakkah's full-sized avatar
💡
I've Got An Idea

Cheyne Etie Chewbakkah

💡
I've Got An Idea
View GitHub Profile
@Chewbakkah
Chewbakkah / regex-credit-card-tutorial.md
Last active March 12, 2022 04:52
REGEX Credit Card Tutorial

REGEX Credit Card Info

This will be a short tutorial on using REGEX to determine if a given credit card number fits the known creteria of how credit card numbers are issued.

Summary

All credit cards issued follow a certain number sequence that dictates what type of card they are. Each credit card type has a different set of numbers that can be used to determine if the user's input falls within a given set of rules that verify a certain level of authenticity. Numbers can fall within this ruleset and still not be a valid card however, this is just used to narrow the possibility of a wrong number being entered.

Table of Contents