How to get the type of card like debit card or credit card using card number.. are there any regular expressions like we have for types of credit cards?
Thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 6, 2014, 5:56 AM
You just have to know (for a given issuer) which ranges of numbers represent debit and credit cards.
There's a useful list here on Wikipedia:
http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers
but, as you'll see, trying to devise a single regular expression to make this determination would be impractical.