This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This program uses the test() method of the regular expression object | |
// to check if the card number matches the pattern of the respective card type. | |
// The program will check for a match against a regular expression for Visa, Mastercard, | |
// Verve and Discover card numbers in that order. | |
// If the card number is valid for a specific card type the respective | |
// message will be displayed and the checking will stop. | |