Re: Looking for a certain regexp

From: Purl Gurl (purlgurl_at_purlgurl.net)
Date: 06/30/04


Date: Tue, 29 Jun 2004 16:31:28 -0700

Robert TV wrote:
 
(snipped)

> Hi, has onyone ever created a regexp to match common credit card formulas? I
> have been asked to "validate" some CC#'s we have on file. I do not know the
> formulas by which credit cards are generated.

None of your syntax will "validate" a credit card.

You may check for the correct number of digits, but
this does not check for validity.

Credit card numbers use a pseudo checksum method for
validating the number itself. Those numbers must
match specific mathematical formulas, and produce
specific mathematical results for validation.

There are plenty of credit validation programs on
the net for your research and reading.

Research first, ask here last.

A key term is "mod 10 algorithm" for your research.

You might enjoy finding an antiquated copy of AOHell
which contains a facility for generating false credit
card numbers, which do validate.

My suggestion is you research this topic carefully
before your supervisor realizes what you would rather
he not.

Purl Gurl



Relevant Pages

  • is this a hoax or MS authenication request asking for my credit ca
    ... blindly give out your credit card to an unsolicited email ... >their Windows Operating System. ... If you do not validate your serial number, ...
    (microsoft.public.windowsxp.general)
  • Re: [PHP] global address collection
    ... before me required the customers to enter their credit card number ... It's a simple matter to remove spaces for ... practice because we as programmers should validate, ...
    (php.general)
  • Looking for a certain regexp
    ... has onyone ever created a regexp to match common credit card formulas? ... like to validate the first number as being 4,5,3 etc. and that the scalar is ... at least 13 characters long. ... char of a scalar ... ...
    (comp.lang.perl.misc)
  • European credit card validation
    ... it doesn't validate with the bank, ... Anyone aware of European oriented PHP credit card validation scripts? ...
    (comp.lang.php)