Other Resources:
MasterCard credit card number validation
All credit card numbers issued by MasterCard must start with 51 through 55 and have 16 digits. For example, 5271190242643112 is a valid MasterCard credit card number.
How to write a single regular expression to validate a MasterCard credit card number described above?
✍: FYIcenter.com
![]()
Here is the regular expression for MasterCard credit card number validation:
^5[1-5][0-9]{14}$
^ - begin of the string
5 - matches 5 itself
[1-5] - 1, 2, 3, 4, or 5
[0-9] - any decimal digit
{14} - repeating 14 times
$ - end of the string
2013-01-22, 0👍, 0💬
Popular Posts:
All credit card numbers issued by Diners Club must start with 300 through 305, 36 or 38 and have 14 ...
All credit card numbers issued by Diners Club must start with 300 through 305, 36 or 38 and have 14 ...
How to capture the Soso Spider entries from Web log file? Here are some Web log file entries: 127.0....
All credit card numbers issued by American Express must start with 34 or 37 and have 15 digits. For ...
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...