[AccessD] Search for credit card numbers

Mark A Matte markamatte at hotmail.com
Fri Apr 18 13:12:54 CDT 2008


Thanks Mike,

I had already considered the different lengths and seperators... this ,"(\d+((\ |-)?\d+)+)", intrigues me...what do I do with it/how do i call it???  The numbers I'm looking for are in the middle of the text of a MEMO field.  

Thanks again,

Mark A. Matte


> Date: Fri, 18 Apr 2008 12:32:17 -0400
> From: jedi at charm.net
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Search for credit card numbers
>
> Hi Mark, your best solution is to use a regular expression to match a
> pattern of numbers. CC numbers can have dashes or spaces separating the
> number groups or can be contiguous--just depends on how it was written.
> For example using a pattern like
>
> (\d+((\ |-)?\d+)+)
>
> Meaning:
> 1. The first set of parens (outer) capture the whole matching CC number.
> 2. The first \d+ means one or more digits
> 3. The ((\ |-)?\d+) means the next char either a space or "-" may exist
> (because of the ?) and then again 1 or more digits
> 4. And the final + is one or more of the pattern in #3.
>
> would cover 3 possible patterns
> 0000-0000-0000-0000
> 0000 0000 0000 0000
> 0000000000000000
>
> CC number length range from 13 to 16 digits so this should catch them.
> however this is not foolproof. If you happen to have some other number
> that matches that pattern then it too will get caught.
>
> If you want to determine the issuer then a simple case statement matching
> the identifier will suffice.
>
> Give this some thought.
>
> Mike...
>
>
>>
>> Hello All,
>>
>> I'm getting ready to build something that searches MEMO and text fields
>> for credit card numbers (card number NOT known)...and then replace them.
>>
>> Before I got started, I was wondering if anyone has any advice...or has
>> done somthing similar.
>>
>> Thanks,
>>
>> Mark A. Matte
>> _________________________________________________________________
>> Use video conversation to talk face-to-face with Windows Live Messenger.
>> http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
Pack up or back up–use SkyDrive to transfer files or keep extra copies. Learn how.
http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_packup_042008



More information about the AccessD mailing list