RE: Is there a 'does not contain' comparison?
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23883
interpreted = N
texte = To Ken, Olin, and RobertThank you!I had kind of figured I would have to nest the [hideif]s to do this. I like those complex checks, much more detailed and accurate then what I would have been able to come up with.Thanks!>Greetings:>>> [Hideif [email]=@.][math]err=1[/math]>> You must enter a valid
Email Address.
>> [/hideif]>>You can't do what you want, but you could do this which would catch if it>had 2 emails:>>[Hideif [email]=@]> [Hideif [email]=.]> [math]err=1[/math]> You must enter a valid
Email Address.
> [/hideif]>[/hideif]>>If you want a really good email checker, create the following include file:>>===checkEmail.inc===>[math show=f]xtotal=1[/math][math>show=f]ilen=[countChars][args][/countChars][/math][text]varEnds=[getchars>start=1&end=1][args][/getchars][getchars>start=[math]ilen[/math]&end=[math]ilen[/math]][args][/getchars][/text][text]>varMid=[getchars>start=2&end=[math]ilen-1[/math]][args][/getchars][/text][math>show=f]xtotal=xtotal*[showif [text]varMid[/text]^@]1[/showif][hideif>[text]varMid[/text]^@]0[/hideif][/math][math show=f]xtotal=xtotal*[showif>[text]varMid[/text]^.]1[/showif][hideif>[text]varMid[/text]^.]0[/hideif][/math][math show=f]xtotal=xtotal*[showif>[text]varEnds[/text]^@]0[/showif][hideif>[text]varEnds[/text]^@]1[/hideif][/math][math show=f]xtotal=xtotal*[showif>[text]varEnds[/text]^.]0[/showif][hideif>[text]varEnds[/text]^.]1[/hideif][/math][math show=f]xtotal=xtotal*[showif>[args]^ ]0[/showif][hideif [args]^ ]1[/hideif][/math][showif>[math]xtotal[/math]=1]T[/showif][hideif [math]xtotal[/math]=1]F[/hideif]>===/checkEmail.inc===>>Now call this as follows:>>[Hideif [include file=checkEmail.inc&args=[yourEmailVarToCheck]]=T]> [math]err=1[/math]> You must enter a valid
Email Address.
>[/hideif]>>This will check for lots of things and catch most malformed email addresses>(thanks Harry).>>Aloha, Olin>>>
Associated Messages, from the most recent to the oldest:
To Ken, Olin, and RobertThank you!I had kind of figured I would have to nest the
[hideif]s to do this. I like those complex checks, much more detailed and accurate then what I would have been able to come up with.Thanks!>Greetings:>>> [Hideif [email]=@.]
[math]err=1[/math]>> You must enter a valid
Email Address.
>> [/hideif]>>You can't do what you want, but you could do this which would catch if it>had 2 emails:>>[Hideif [email]=@]> [Hideif [email]=.]>
[math]err=1[/math]> You must enter a valid
Email Address.
> [/hideif]>[/hideif]>>If you want a really good email checker, create the following include file:>>===checkEmail.inc===>[math show=f]xtotal=1[/math][math>show=f]ilen=
[countchars][args][/countChars][/math]
[text]varEnds=[getchars>start=1&end=1][args][/getchars][getchars>start=
[math]ilen[/math]&end=
[math]ilen[/math]][args][/getchars][/text]
[text]>varMid=[getchars>start=2&end=
[math]ilen-1[/math]][args][/getchars][/text][math>show=f]xtotal=xtotal*[showif
[text]varMid[/text]^@]1[/showif][hideif>
[text]varMid[/text]^@]0[/hideif][/math][math show=f]xtotal=xtotal*[showif>
[text]varMid[/text]^.]1[/showif][hideif>
[text]varMid[/text]^.]0[/hideif][/math][math show=f]xtotal=xtotal*[showif>
[text]varEnds[/text]^@]0[/showif][hideif>
[text]varEnds[/text]^@]1[/hideif][/math][math show=f]xtotal=xtotal*[showif>
[text]varEnds[/text]^.]0[/showif][hideif>
[text]varEnds[/text]^.]1[/hideif][/math][math show=f]xtotal=xtotal*[showif>[args]^ ]0[/showif][hideif [args]^ ]1[/hideif][/math][showif>
[math]xtotal[/math]=1]T[/showif][hideif
[math]xtotal[/math]=1]F[/hideif]>===/checkEmail.inc===>>Now call this as follows:>>[Hideif [include file=checkEmail.inc&args=[yourEmailVarToCheck]]=T]>
[math]err=1[/math]> You must enter a valid
Email Address.
>[/hideif]>>This will check for lots of things and catch most malformed email addresses>(thanks Harry).>>Aloha, Olin>>>
webcat
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:
Opinion: [input] should be called [output] ... (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Max Record length restated as maybe bug (1997)
Webcatalog and foreign languages (1998)
SiteEdit Pro Update Announcement (1997)
Major Security Hole IIS NT (1998)
[IpAddress] Tag (1997)
showif comparison begins w/ and contains (1997)
WCS Newbie question (1997)
with Link i need to (1997)
[WebDNA] Receive JSON POST (2019)
Deleting duplicates from a db (2000)
Up and running ... at last !! (1997)
Submitting ampersands in forms... (1998)
[WriteFile] problems (1997)
orders being printed (1998)
Hello??? (1997)
Grepping text variable tags (was: No subject given) (2000)
WebCat2.0 acgi vs plugin (1997)
Where is the bug fix info for 4.0.1? (2000)