Thank you Alan. That works great as a first level check for me. I'll still
be doing more checks if this one doesn't find matches but it allows me to
have a short circuit.

regards,
Preet, in Auckland NZ



On Wed, 18 Dec 2019 at 19:23, Alan Ingleby <alan.ingl...@gmail.com> wrote:

> https://www.regextester.com/106873
>
> Still using Regex, but so simple.
>
> On Wed, 18 Dec 2019 at 15:56, mike smith <meski...@gmail.com> wrote:
>
>> There's the odd number/arrangement that amex uses to check for as well
>>
>> On Wed, Dec 18, 2019, 16:14 Eddie de Bear <eddie.deb...@gmail.com> wrote:
>>
>>> Hi Preet,
>>>
>>> I always check when somebody mentions credit card processing..
>>>
>>> Anyways, off the top of my head I don't know of any component that can
>>> easily identify credit card info. I suspect your in for a world of pain
>>> using Regex to identify potential card numbers and then a Luhn check to see
>>> if it is actually a valid card number.
>>>
>>> From my bookmarks:
>>> https://en.wikipedia.org/wiki/Luhn_algorithm
>>>
>>> https://stackoverflow.com/questions/21249670/implementing-luhn-algorithm-using-c-sharp
>>>
>>> Might be helpful..
>>>
>>> Ed.
>>>
>>> On Wed, Dec 18, 2019 at 4:33 PM Preet Sangha <preetsan...@gmail.com>
>>> wrote:
>>>
>>>> Hi Ed,
>>>>
>>>> Thanks for that. We are an large enterprise platform doing thousands of
>>>> transactions via gateways - CC info is normally flowing through our code
>>>> except in the most secure of ways - we are PCI compliant. However to be
>>>> extra careful I'm trying to remove anything that looks like a known CC
>>>> shape from logging. It's to prevent issues in case someone inadvertently
>>>> stores CC in fields that they shouldn't. Yes there education but sometimes
>>>> mistakes happen.
>>>>
>>>> regards,
>>>> Preet, in Auckland NZ
>>>>
>>>>
>>>>
>>>> On Wed, 18 Dec 2019 at 16:57, <eddie.deb...@gmail.com> wrote:
>>>>
>>>>> Hi Preet,
>>>>>
>>>>>
>>>>>
>>>>> I don’t know of any libraries that handle this, but I do have a
>>>>> question for you.
>>>>>
>>>>>
>>>>>
>>>>> Why are you validating credit card info?
>>>>>
>>>>>
>>>>>
>>>>> I ask this because if you are validating card info then you are
>>>>> handling/processing card info. Any business handling credit card
>>>>> information should have PCI-DSS compliance.
>>>>>
>>>>>
>>>>>
>>>>> Personally, I find it is much easier to use external providers (eway,
>>>>> paypal et al) to handle the whole payment process, meaning your code never
>>>>> needs to touch a credit card number and you never have to worry about
>>>>> compliance, *security etc.
>>>>>
>>>>>
>>>>>
>>>>> Just a another random thought, YMMV.
>>>>>
>>>>>
>>>>>
>>>>> *Security of the card information
>>>>>
>>>>>
>>>>>
>>>>> Ed.
>>>>>
>>>>>
>>>>>
>>>>> *From:* ozdotnet-boun...@ozdotnet.com <ozdotnet-boun...@ozdotnet.com> *On
>>>>> Behalf Of *Preet Sangha
>>>>> *Sent:* Wednesday, 18 December 2019 2:41 PM
>>>>> *To:* ozDotNet <ozdotnet@ozdotnet.com>
>>>>> *Subject:*
>>>>>
>>>>>
>>>>>
>>>>> Would anyone know of any credit card validation/detection or similar
>>>>> libraries that we may be able incorporate into our .net framework code
>>>>> (preferably in nuget form) in order to eliminate our own hand coded regexs
>>>>>  please?
>>>>>
>>>>>
>>>>>
>>>>> Regards Preet
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> *EDDIE DE BEAR*
>>> Mob: 0417066315
>>> Messenger: eddie_deb...@hotmail.com
>>> Skype: eddiedebear
>>>
>>
>
> --
> Alan Ingleby
>

Reply via email to