Re: Removing user entered whitespace...

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 60332
interpreted = N
texte = Here is the code I used to space the numbers:- [text]cardnumber=[listwords words=[card]&delimiters= ][word][/listwords][/text] [text]cardchars=[countchars][cardnumber][/countchars][/text] [getchars start=1&end=4][cardnumber][/getchars][!] [/!] -- [getchars start=5&end=8][cardnumber][/getchars][!] [/!] -- [getchars start=9&end=12][cardnumber][/getchars][!] [/!] -- [getchars start=13&end=16][cardnumber][/getchars][!] [/!][showif [cardchars]>16] -- [getchars start=17&end=20][cardnumber][/getchars][/showif][!] [/!][showif [cardchars]>20] -- [getchars start=21&end=24][cardnumber][/getchars][/showif] Dont know if it is the best way or not but it works just fine for me, I am always open to suggestions (or critisism I guess... ) ;-) Cheers Alan devaulw@onebox.com wrote: >Rather than worry about all of the characters that might be entered that would need to be escaped/trapped, this will keep only numbers: > >[grep search=([0-9])*&replace=\1][card][/grep] > >Can you post the code you use to space the card number? > >Bill > >-----Original Message----- >From: Tom Duke >Sent: Tue, 7 Dec 2004 13:57:17 -0000 >To: "WebDNA Talk" >Subject: Re: Removing user entered whitespace... > >Alan, > >It won't remove carraige returns from textarea's, you could do this by using a convertchars db:- > >FromTo >%20 >%0B > >This will convert spaces to nothing and soft carraige returns to nothing. > >You could possibly also achieve this by adding the hex code for a soft return to your listwords delimiters. > >- Tom > >------------------------------------------------------------- >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://webdna.smithmicro.com/ > > > >------------------------------------------------------------- >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://webdna.smithmicro.com/ > > > ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Removing user entered whitespace... ( William DeVaul 2004)
  2. Re: Removing user entered whitespace... ( Alan White 2004)
  3. Re: Removing user entered whitespace... ( devaulw@onebox.com 2004)
  4. Re: Removing user entered whitespace... ( "Tom Duke" 2004)
  5. Re: Removing user entered whitespace... ( Alan White 2004)
  6. Removing user entered whitespace... ( Alan White 2004)
Here is the code I used to space the numbers:- [text]cardnumber=[listwords words=[card]&delimiters= ][word][/listwords][/text] [text]cardchars=[countchars][cardnumber][/countchars][/text] [getchars start=1&end=4][cardnumber][/getchars][!] [/!] -- [getchars start=5&end=8][cardnumber][/getchars][!] [/!] -- [getchars start=9&end=12][cardnumber][/getchars][!] [/!] -- [getchars start=13&end=16][cardnumber][/getchars][!] [/!][showif [cardchars]>16] -- [getchars start=17&end=20][cardnumber][/getchars][/showif][!] [/!][showif [cardchars]>20] -- [getchars start=21&end=24][cardnumber][/getchars][/showif] Dont know if it is the best way or not but it works just fine for me, I am always open to suggestions (or critisism I guess... ) ;-) Cheers Alan devaulw@onebox.com wrote: >Rather than worry about all of the characters that might be entered that would need to be escaped/trapped, this will keep only numbers: > >[grep search=([0-9])*&replace=\1][card][/grep] > >Can you post the code you use to space the card number? > >Bill > >-----Original Message----- >From: Tom Duke >Sent: Tue, 7 Dec 2004 13:57:17 -0000 >To: "WebDNA Talk" >Subject: Re: Removing user entered whitespace... > >Alan, > >It won't remove carraige returns from textarea's, you could do this by using a convertchars db:- > >FromTo >%20 >%0B > >This will convert spaces to nothing and soft carraige returns to nothing. > >You could possibly also achieve this by adding the hex code for a soft return to your listwords delimiters. > >- Tom > >------------------------------------------------------------- >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://webdna.smithmicro.com/ > > > >------------------------------------------------------------- >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://webdna.smithmicro.com/ > > > ------------------------------------------------------------- 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://webdna.smithmicro.com/ Alan White

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 editing, SiteGuard WAS:SiteAssociative lookup style? (1997) Execute Applescript (1997) changing names of Graphic files (2002) Re:[ShowIf] and empty fields (1997) really wierd browser truncating (1997) RAM problems, [appendfile] problems (1998) Sort Order on a page search (1997) Combining search criteria (2000) Help with [search] sort (2003) &summ=T >> numfound (2002) Backwards list behavior ... (1997) Mass download. (2003) [subtotal] and others (1997) Passing WebCat data to SSL server (1997) protect (summer holidays with wcat???) (2000) thankyou.tmpl (1997) _ in front of field name (1998) several .hdr files with one db file? (1999) Upload and WebCat (1998) Newbie Tax Question (1997)