我需要一個elo信用卡的正則表達式,它應該只允許前6位數字在下面提及。總長度將是16,全部16只應該是數字。字母不允許。ELO信用卡正則表達式
允許的前綴:
401178,401179,431274,438935,451416,457393,457631,457632, 504175,627780,636297,636368,655000,655001,651652,651653, 651654,650485 ,650486,650487,650488,506699到506778和509000 至509999
你有沒有使用正則表達式之前的交替? –
@TimBiegeleisen nope – sathwik
這是在Elo工作的朋友給我的RegExp:/ ^((431274)|(438935)|(451416)|(457393)|(504175)|(627780)|(636297)| (636368)|(40117)[8-9] |(45763)[1-2] |(506)(699 | 7 [1-7] [1-8])|(509)[0-9] [ 0-9] [0-9] |(65003)[1-3] |(6500)(3 [5-9] | 4 [0-9] | 5 [0-1])|(6504)(0 [5-9] | 1 [0-9] | 2 [0-9] | 3 [0-9])|(650)(圖4(8 [5-9] | 9 [0-9])| 5 ([0-2] [0-9] | 3 [0-8]))|(6505)(4 [1-9] | [5-8] [0-9] | 9 [0-8]) |(6507)(0 [0-9] | 1 [0-8])|(65072)[0-7] |(6509)(0 [1-9] | 1 [0-9] | 20)| (6516)(5 [2-9] | [6-7] [0-9])|(6550)[0-1] [0-9] |(6550)(2 [1-9] | [3 -4] [0-9] | 5 [0-8]))/ –