Re: easiest way to check for a non-alphanumeric character?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35396
interpreted = N
texte = Brilliant!! Thanks Joe! :-)- side note -Notice that my current checker code:**** [showif [URL][loginString][/URL]^%] [text show=F]StringValueError=T[/text] [/showif][showif [URL][loginString][/URL]^/] [text show=F]StringValueError=T[/text] [/showif][showif [URL][loginString][/URL]^.] [text show=F]StringValueError=T[/text] [/showif]*****does in fact catch every character you suggested it would not catch. (except for the underscore ((and a dash - which you didn't mention but could have)) but actually I meant to say that I want to allow underscores and dashes as well as all alphanumeric chars.)See? When you [url]ize the formvar it changes most stuff into hexadecimal form which for most non-alphanumeric chars start with a % - which I look for ;-)I could have phrased my question like this - What chars other than:alphanumeric chars - _ / .DO NOT start with a % when wrapped in an [url] context?If someone knows the answer then I can save the small hassle of doing the elegant way you suggest.-JohnJoseph D'Andrea wrote:> At 2:21 PM 7/29/00, John Butler wrote: > >***** > > > >Do I need more? > >I.e. is this enough to check for any possible non-alphanumeric char? > > No. You're not checking for space _ , = + { } ' * blah blah blah. > And my experience with the check every bad value approach is that > it is time consuming, produces ugly code, and I invariably miss some > character or another. > > There are a couple of ways to accomplish what you want. > > One way is to create a conversion database which converts a-z, A-Z > and 0-1 to nothing. Then set a temporary text variable to the value > of the form variable. Pass the temp variable through the conversion > db above which would leave everything in the string except > alphanumerics. Then if the size of the temp variable is not zero, > they made and input error. > > ___Joe___ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: easiest way to check for a non-alphanumeric character? (John Butler 2000)
  2. Re: easiest way to check for a non-alphanumeric character? (Joseph D'Andrea 2000)
  3. easiest way to check for a non-alphanumeric character? (John Butler 2000)
Brilliant!! Thanks Joe! :-)- side note -Notice that my current checker code:**** [showif [url][loginString][/URL]^%] [text show=F]StringValueError=T[/text] [/showif][showif [url][loginString][/URL]^/] [text show=F]StringValueError=T[/text] [/showif][showif [url][loginString][/URL]^.] [text show=F]StringValueError=T[/text] [/showif]*****does in fact catch every character you suggested it would not catch. (except for the underscore ((and a dash - which you didn't mention but could have)) but actually I meant to say that I want to allow underscores and dashes as well as all alphanumeric chars.)See? When you [url]ize the formvar it changes most stuff into hexadecimal form which for most non-alphanumeric chars start with a % - which I look for ;-)I could have phrased my question like this - What chars other than:alphanumeric chars - _ / .DO NOT start with a % when wrapped in an [url] context?If someone knows the answer then I can save the small hassle of doing the elegant way you suggest.-JohnJoseph D'Andrea wrote:> At 2:21 PM 7/29/00, John Butler wrote: > >***** > > > >Do I need more? > >I.e. is this enough to check for any possible non-alphanumeric char? > > No. You're not checking for space _ , = + { } ' * blah blah blah. > And my experience with the check every bad value approach is that > it is time consuming, produces ugly code, and I invariably miss some > character or another. > > There are a couple of ways to accomplish what you want. > > One way is to create a conversion database which converts a-z, A-Z > and 0-1 to nothing. Then set a temporary text variable to the value > of the form variable. Pass the temp variable through the conversion > db above which would leave everything in the string except > alphanumerics. Then if the size of the temp variable is not zero, > they made and input error. > > ___Joe___ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Butler

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Webcat 2.0.1 date math bug -> Crash! (1997) WebCatalog Use Question (1997) ampersand (1998) Error & Problem (1997) WC2b12: Yes, Formulas.db is for real (1997) Error: Can't open order file. Ignoring [OrderFile] context (2000) Giving out error pages (1997) Authenticate (1999) E-mail/Invoice (1998) [OT] DOD again *MYSTERY SOLVED* (2003) Next X hits (1996) Fun with dates (1997) WebCatalog 2.1b4/Mac available (1997) Verify entry into a text field (2005) PCS Frames (1997) M$loth messes with our sites (again) 2004/02/03 (2004) [WebDNA] Processor Maxing out (2010) WebCatalog for Postcards ? (1997) [BoldWords] WebCat.acgib15Mac (1997) Unique SKU Numbers (2000)