VRMink/credit-card-identifier — pull request #2 by limianwang (2014-07-01 17:12:51+00:00)
Title: Updated ChinaUnionPay/Discover Regex

Updated the Discover Regex. The old one did not include China Union Pay, which is part of Discover now.

The following is taken from: http://www.richardsramblings.com/regex/credit-card-numbers/

> Discover Card

> The first six digits of any credit or debit card identify the issuing authority or bank. According to the Discover Network’s developer documentation, Discover Card’s issuer identification numbers start with 6011, 622126-622925 (Discover cards in this range are dual-branded with UnionPay), 644-649, or 65.

> Not as intuitively simple as VISA or MasterCard regexes due to the full-length IINs, an input-validation regex for 16-digit Discover card numbers needs to account for the range of six-digit issuer identifiers. No spaces or dashes are allowed, e.g. “6011000990139424″.
^6(?:011\d\d|5\d{4}|4[4-9]\d{3}|22(?:1(?:2[6-9]|[3-9]\d)|[2-8]\d\d|9(?:[01]\d|2[0-5])))\d{10}$