Regex Guru

Thursday, 13 March 2008

Validating Credit Card Numbers

Filed under: Regex Examples — Jan Goyvaerts @ 8:33

After you’ve graciously stripped out spaces and dashes, you can check whether the card number looks like a valid number and even determine the brand of the card with a few simple regular expressions. I’ve published a new article on finding and verifying credit card numbers on regular-expressions.info with some in-depth information and a full set of example regexes.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • YahooMyWeb
  • Live
  • StumbleUpon
  • Spurl