Welcome Guest, Not a member yet? Register   Sign In
how to mask credit card number (using regex?)
#11

[eluser]Pygon[/eluser]
The regex I gave is not superfluos[sic] as you put it. In the context as I have put it, with the intention of creating standards, it is not superfluous as it does what is intended. Maybe you feel I should write out an entire library, but I didn't believe it was necessary. Superfluous would be your replacement of letters and and symbols as well as numbers, except "- ", the addition of yet another regex to verify the user input, and yet another regex to strip all of the unnecessary jumble yet again before submission to most billing systems--thus the true meaning of being "redundant".

You are right about "what the original poster asked for..." -- I'm glad the intention of the forum is to obscurely answer questions without providing any insight into other, more useful ways of doing something (which, by the way, I did in my original post with function 2 while increasing the speed of the function and working for 14-16 digit cards).

Atleast you did get one thing right, I didn't write my function to handle AMEX cards, then again, I'm not trying to write a fully functional for every situation system.

FYI, your function is 100% slower even when I correct mine for an strlen of the stripped input. Wink As fun as point, counter-point is, I think coolfactors question has been answered.


Messages In This Thread
how to mask credit card number (using regex?) - by El Forum - 11-01-2007, 12:24 AM
how to mask credit card number (using regex?) - by El Forum - 11-01-2007, 12:43 AM
how to mask credit card number (using regex?) - by El Forum - 11-01-2007, 12:54 AM
how to mask credit card number (using regex?) - by El Forum - 11-01-2007, 05:46 PM
how to mask credit card number (using regex?) - by El Forum - 11-01-2007, 07:36 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 08:20 AM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 09:42 AM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 11:13 AM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 12:08 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 12:13 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 12:32 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 12:55 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 01:25 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 01:37 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 01:53 PM
how to mask credit card number (using regex?) - by El Forum - 11-02-2007, 02:35 PM
how to mask credit card number (using regex?) - by El Forum - 11-03-2007, 07:44 AM
how to mask credit card number (using regex?) - by El Forum - 11-03-2007, 12:17 PM
how to mask credit card number (using regex?) - by El Forum - 11-03-2007, 12:44 PM
how to mask credit card number (using regex?) - by El Forum - 11-03-2007, 03:51 PM
how to mask credit card number (using regex?) - by El Forum - 11-03-2007, 06:02 PM
how to mask credit card number (using regex?) - by El Forum - 04-29-2009, 04:09 AM
how to mask credit card number (using regex?) - by El Forum - 04-29-2009, 06:41 AM
how to mask credit card number (using regex?) - by El Forum - 07-23-2009, 11:36 AM
how to mask credit card number (using regex?) - by El Forum - 08-05-2009, 09:37 PM
how to mask credit card number (using regex?) - by El Forum - 06-24-2010, 10:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB