Skip to content

Instantly share code, notes, and snippets.

@kevinsearle
Created December 5, 2012 08:25
Show Gist options
  • Save kevinsearle/4213783 to your computer and use it in GitHub Desktop.
Save kevinsearle/4213783 to your computer and use it in GitHub Desktop.
PCRE All Major Credit Cards
//All major credit cards regex
'/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|622((12[6-9]|1[3-9][0-9])|([2-8][0-9][0-9])|(9(([0-1][0-9])|(2[0-5]))))[0-9]{10}|64[4-9][0-9]{13}|65[0-9]{14}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})*$/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment