Android Credit Card Check IsJCBCreditCard(String UnformattedAccountNumber)

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

Description

Is JCB Credit Card

Declaration

private static boolean IsJCBCreditCard(String UnformattedAccountNumber) 

Method Source Code

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

public class Main {
    private static boolean IsJCBCreditCard(String UnformattedAccountNumber) {
        Pattern p = Pattern.compile("^(?:2131|1800|35\\d{3})\\d{11}$");
        Matcher m = p.matcher(UnformattedAccountNumber);
        return m.matches();
    }/*from  w  w  w. j av a 2 s  .  c  om*/
}

Related

  1. IsAmericanExpressCreditCard( String UnformattedAccountNumber)
  2. IsDinersClubCreditCard( String UnformattedAccountNumber)
  3. IsDiscoverCreditCard( String UnformattedAccountNumber)
  4. IsMasterCardCreditCard( String UnformattedAccountNumber)
  5. IsVISACreditCard(String UnformattedAccountNumber)
  6. FindCreditCard(String AccountNumber)
  7. FormatAccountNumber( String UnformattedAccountNumber, int subGroupLength, String Seperator)