There are two factors to consider when deciding how to handle the problem of a work sample: sample size and population characteristics. Sample size is determined by a formula based on the power of the sample or its ability to represent the population with a predictable margin of error.
The resulting complexity makes card type detection code difficult to write, read, and maintain. As an example of this complexity, consider this JavaScript regular expression used to detect Discover card numbers starting with 6011, 622126-622925, 644-649, and 65:
Sometimes it may be difficult to see how a single location business could eventually be a national or international brand. Well, here is a story of a brand that has grown exceptionally well that started with a 17 year old sandwich store owner. A Story about a Franchise Brand: Jersey Mikeâs. The concept was born in 1956 originally as a mom and pop sandwich operation.