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:

Emailer (1997) How do I write this search? (2006) WC2/Mac -- Forms not submitting correctly with Mac browsers (1997) WebCommerce: Folder organization ? (1997) ALERT: Please unsubscribe? (2000) hideif/showif causes error if wrapped around searches (2003) Web Logs (1998) Emailer help....! (1997) Location of Browser Info.txt file (1997) writing checkboxes to a database (2000) all records returned. (1997) Multiple SSL Keys (1998) searching with groups (1997) [subtotal] (2000) Associative lookup style? (1997) Multiple fields on 1 input (1997) credit card # checker ??? (2004) Conditional searching & displaying (1997) Variables (1999) Looking for a special Image Upload Script (2004)