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:
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
All credit card numbers issued by MasterCard must start with 51 through 55 and have 16 digits. For e...
How to capture the Sogou web spider entries from Web log file? Here are some Web log file entries: 1...
All credit card numbers issued by JCB have 3 sets of numbers: JCB cards start with 2131 have 15 digi...
A free online regular expression test tool that allows to try you regular expression pattern and see...