Android Credit Card Check IsAmericanExpressCreditCard( String UnformattedAccountNumber)

Here you can find the source of IsAmericanExpressCreditCard( String UnformattedAccountNumber)

Description

Is American Express Credit Card

Declaration

private static boolean IsAmericanExpressCreditCard(
            String UnformattedAccountNumber) 

Method Source Code

//package com.java2s;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    private static boolean IsAmericanExpressCreditCard(
            String UnformattedAccountNumber) {
        Pattern p = Pattern.compile("^3[47][0-9]{13}$");
        Matcher m = p.matcher(UnformattedAccountNumber);
        return m.matches();
    }/*from   w  w  w .  ja  v a2 s.  c  om*/
}

Related

  1. IsDinersClubCreditCard( String UnformattedAccountNumber)
  2. IsDiscoverCreditCard( String UnformattedAccountNumber)
  3. IsJCBCreditCard(String UnformattedAccountNumber)
  4. IsMasterCardCreditCard( String UnformattedAccountNumber)