Android Credit Card Check IsMasterCardCreditCard( String UnformattedAccountNumber)

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

Description

Is Master Card Credit Card

Declaration

private static boolean IsMasterCardCreditCard(
            String UnformattedAccountNumber) 

Method Source Code

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

public class Main {
    private static boolean IsMasterCardCreditCard(
            String UnformattedAccountNumber) {
        Pattern p = Pattern.compile("^5[1-5][0-9]{14}$");
        Matcher m = p.matcher(UnformattedAccountNumber);
        return m.matches();
    }//from  w  w w .jav  a  2  s .c o  m
}

Related

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