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:

using WebCat for Associate Programs? (1998) French characters in variables (2001) [WebDNA] remove html comments (2009) Date sorting (1997) [WebDNA] WebDNA Newbie Questions (2008) WebCatalog2 Feature Feedback (1996) Preferred Web Design Tool? (1999) WebCatalog can't find database (1997) Forms Search Questions (1997) RE: WebCat: Access denied, but why? (1997) [searchString] (1997) WebCatalog NT (1996) Practice runs ? (1997) help (2001) [interpret] inside the db field? (1997) Help formatting search results w/ table (1997) Webstar 1.3.1 PPC (1997) SORRY (1997) Typhoon Rev. and PCS store problems (1999) Directory Overload (1998)