[WebDNA] How to NOT remove the dot via grep ...

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103322
interpreted = N
texte = Bob Minor posted some code the other day that illustrates the use of grep to strip out all characters except for numeric digits: > [grep search=[^0-9]&replace=][value][/grep] My goal is to do nearly the same thing, but I want to leave the dot (.) character in the resulting value so it will be a floating point value. At first I was going to use this code: [listchars chars=[value]][showif 1234567890.^[char]][char] [/showif][/listchars] ... but I think grep might be more efficient if it were written properly. I only wish I knew how. Does anyone know grep well enough to suggest a grep search string that would leave not only the numeric digits but also a decimal point in the resulting value? Sincerely, Ken Grome Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] How to NOT remove the dot via grep ... (christophe.billiottet@webdna.us 2009)
  2. Re: [WebDNA] How to NOT remove the dot via grep ... (William DeVaul 2009)
  3. [WebDNA] How to NOT remove the dot via grep ... (Kenneth Grome 2009)
Bob Minor posted some code the other day that illustrates the use of grep to strip out all characters except for numeric digits: > [grep search=[^0-9]&replace=][value][/grep] My goal is to do nearly the same thing, but I want to leave the dot (.) character in the resulting value so it will be a floating point value. At first I was going to use this code: [listchars chars=[value]][showif 1234567890.^[char]][char] [/showif][/listchars] ... but I think grep might be more efficient if it were written properly. I only wish I knew how. Does anyone know grep well enough to suggest a grep search string that would leave not only the numeric digits but also a decimal point in the resulting value? Sincerely, Ken Grome Kenneth Grome

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:

Emailer help....! (1997) Updating a database once per day - An example (1998) choice of images (2000) Server Takes 2 Hours to Boot UP (2004) Release of 2.01? (1997) WebCat2: Items xx to xx shown, etc. (1997) Creating main- and sub-category search (1997) 3rd request: What are SMSI's upgrade policies? (2003) Netscape v. IE (1997) Re[2]: Re[2]: OT: Amazon Patents (2000) Making a secret cookie code in WebCat (2001) updating with ProductEditor (1998) [WebDNA] Putting '&search' into URL killing all search contexts on my sites (2010) Searching multiple fields from one form field (1997) New Image Gallery using WebDNA and ImageMagick (2003) [WebDNA] preventing hackers from posting their own (altered) version of my form? (2009) Webcatalog 4.01 and Webstar 4.2.1, is it OK? (2000) WebCat2: Items xx to xx shown, etc. (1997) Design Help Needed (1998) [OT] - Credit card processing company fees (2004)