Re: grep question - removing spaces

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 61866
interpreted = N
texte = Try this: [text show=t]ScreenName=[grep search=[^0-9a-zA-Z\-\_\s]&replace=][nickname][/grep][/text] Notice the escaped "s" at the end of the grep search. This represents a space. I can provide a javascript that will do the same thing if you're interested. On 4/26/05 10:44 AM, "Dale's eLists" wrote: > Hello, > > I have a grep statement where I am wanting to only allow > letters, numbers, dashes and underscores. No spaces or other > special charactors (this will eventually be used as a > username for email addresses). > > Using: > > [text show=t]ScreenName=[grep > search=[^0-9a-zA-Z\-\_]&replace=][nickname][/grep][/text] > > if there is an embedded space, it does not get removed. What > have I done wrong with this? ------------------------------------------------------------- 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: grep question - removing spaces ( Clint Davis 2005)
  2. Re: grep question - removing spaces ( devaulw@onebox.com 2005)
  3. Re: grep question - removing spaces ( devaulw@onebox.com 2005)
  4. Re: grep question - removing spaces ( "Dale's eLists" 2005)
  5. Re: grep question - removing spaces ( Marc Thompson 2005)
  6. Re: grep question - removing spaces ( Marc Thompson 2005)
  7. Re: grep question - removing spaces ( devaulw@onebox.com 2005)
  8. Re: grep question - removing spaces ( "Dale's eLists" 2005)
  9. Re: grep question - removing spaces ( devaulw@onebox.com 2005)
  10. grep question - removing spaces ( "Dale's eLists" 2005)
Try this: [text show=t]ScreenName=[grep search=[^0-9a-zA-Z\-\_\s]&replace=][nickname][/grep][/text] Notice the escaped "s" at the end of the grep search. This represents a space. I can provide a javascript that will do the same thing if you're interested. On 4/26/05 10:44 AM, "Dale's eLists" wrote: > Hello, > > I have a grep statement where I am wanting to only allow > letters, numbers, dashes and underscores. No spaces or other > special charactors (this will eventually be used as a > username for email addresses). > > Using: > > [text show=t]ScreenName=[grep > search=[^0-9a-zA-Z\-\_]&replace=][nickname][/grep][/text] > > if there is an embedded space, it does not get removed. What > have I done wrong with this? ------------------------------------------------------------- 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/ Clint Davis

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:

Problem with [CART] number (1998) Signal Raised (1997) Nt's Latest? (1997) date formatting for CC card expiration date check (1998) Spiders (2000) Resume Catalog ? (1997) Time for a hard questions. (1997) carriage returns in data (1997) Format of Required fields error message (1997) Emailer not working (1998) DB Field Name? (2000) Visitor info (2000) Requiring that certain fields be completed (1997) FEA REQ: One .hdr, multiple .db's (2003) OT Pager notification of completed orders (1998) AAAH: stupid sendmail (2001) WC2b15 File Corruption (1997) Part Html part WebDNA (1997) How do I get Google to crawl a WebCat site? (2003) Interesting speed comparison .. (2003)