Entering credit card numbers

Bruce Tognazzini writes in his Ask Tog column Top 10 Reasons to Not Shop On Line:

"...Why can't I input my credit card number the way it appears on the card? Why do I have to suck the extra spaces out, making it all but impossible to re-scan it for errors? We're talking three spaces here, three bytes." (via Usability Views)

I will quite often try to see if a credit card number field gives me enough room to enter it with spaces. If it does, I will then delete the spaces because I know so many places can't handle them.

Any of you web programmers out there, tell me you couldn't write code to strip three spaces out of a credit card number? We're talking regular expressions 101 here.

In a similar vein, I once asked a programmer I was working with to allow social security numbers to accept both no spaces or hyphens, and they told me the code to take hyphens out was easier than the code insisting the user enter it without hyphens.

Posted by Chad Lundgren on Tuesday, February 10, 2004 (Link)