[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regex Question
Mike808,
I think you read into my e-mail quite a bit. The CPAN module really does me
no good aside from
providing a point of reference to see if there are regular expressions it
uses to identify data
patterns. The module looks to be more applicable for credit card validation,
which
involves far more than just a pattern match. Your suggestions on how to
handle data provided by
end users would be helpful, however it just does not fit my situation. I'm
simply coming up with a pattern to mine data held within files. Please don't
get your underscores in a frenzy, this isnt for illegal purposes, its
actually trying to prevent sensitive information from being held in clear
text on a machine. I'm one of the good guys. I'd suggest reading the email,
answering if possible and moving on. Wasting time providing answers to
questions not asked is hardly productive.
>From: mike808@users.sourceforge.net
>Reply-To: luci-discuss@luci.org
>To: luci-discuss@luci.org
>Subject: Regex Question
>Date: Sat, 23 Oct 2004 02:23:51 -0500 (CDT)
>
>"Diego Gardel" <dgardel@hotmail.com> wrote ..
> > I am working on creating a regex to match the various credit card
>numbering
> > patterns.
>
>Don't. Just say no. Do not re-invent the wheel.
>
>Get Business::CreditCard from CPAN, move on, and be more productive.
>
>Read the source code if you want to know how it was done.
>
>Oh, and step 1 is to strip any non-numeric characters from your string.
>Does it really matter if they entered 5-1-2-3-4-5-6-7... or 512----5345...?
>
>Not unless you want to force the user to type it exactly as your program
>requires it. But it only requires numbers, remember? So, let them type what
>they want,
>and do a simple s/[^0-9]//g on it. Then compare against a CC number.
>
>BTW, why _do_ you need to identify some data as containing valid CC
>numbers?
>
>There's several free libraries and SDKs around that do input validation for
>whatever language you're programming in: Perl, Java, PHP, C#, .NET, ASP,
>...
>
>Mike/
>
>-
>To unsubscribe, send email to majordomo@luci.org with
>"unsubscribe luci-discuss" in the body.
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.