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

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103323
interpreted = N
texte = I have no time to try but this might: [^0-9.] The a single period should just be a period inside the brackets. Outside brackets it is a wildcard for any single character. One thing about that regex is that it will leave 9.9.9 alone. You may need a better regex if you think you can get all kinds of crazy input. The problem is largely that WebDNA uses an irregular regex engine. There is no support for + or ranges using {x,y} for example. Bill On Wed, Aug 19, 2009 at 8:12 AM, Kenneth Grome wrote: > 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=3D[^0-9]&replace=3D][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. =A0At first I was going to use this code: > > [listchars chars=3D[value]][showif 1234567890.^[char]][char] > [/showif][/listchars] > > ... but I think grep might be more efficient if it were > written properly. =A0I 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 > > > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category= =3D288 > 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)
I have no time to try but this might: [^0-9.] The a single period should just be a period inside the brackets. Outside brackets it is a wildcard for any single character. One thing about that regex is that it will leave 9.9.9 alone. You may need a better regex if you think you can get all kinds of crazy input. The problem is largely that WebDNA uses an irregular regex engine. There is no support for + or ranges using {x,y} for example. Bill On Wed, Aug 19, 2009 at 8:12 AM, Kenneth Grome wrote: > 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=3D[^0-9]&replace=3D][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. =A0At first I was going to use this code: > > [listchars chars=3D[value]][showif 1234567890.^[char]][char] > [/showif][/listchars] > > ... but I think grep might be more efficient if it were > written properly. =A0I 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 > > > > > > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ > Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category= =3D288 > William DeVaul

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:

Formulas.db not working (2006) How replace title with buttons.jpg (2000) Support ?? (1997) Problem (1997) WebDNA 5.1 is now available! (2003) emailer w/F2 (1997) Dark Horse Comics success story (1997) Re:WebCat Talk Arhives... (1998) Counting LineItems (2000) download a file (2001) Digest for 4/18/97 (1997) Grant, please help me ... (1997) Signal Raised (1997) Date search - yes or no (1997) ShowNext (1997) emailer settings and control questions (1997) displaying New products (using [date]) (1997) Referrer field to header field conversion (1997) Trouble with formula.db (1997) Date Bug (1998)