Before you mark this as answered in another post (I already saw those). But in none of them they specifically say the REGEX they suggest works for C# (I think they focus more on Javascript). Now I am not too good with regex but I would appreciate any help determining how to get the type and once I get the regex how can I validate the cc entered against the regex?
I saw this as an answer in many of the posts here in StackOverflow, but would this work in C# (same code) if yes how can i compare my creditCard string to the regex?
I would really appreciate any help, this is the first time i deal with credit card validation, just need to get the type. Drop down is out of the question based on the feedback from the person needing it.
Any of the regular expressions on that page will work in C#. For example:
A program I always recommend to test out regular expressions in C# is Expresso. You will be able to test out any of the credit card number validation patterns in that program.