Re: Grep to remove all characters except digits?

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 44415
interpreted = N
texte = This will do the trick .. [grep search=[^0-9]&replace=][the_string][/grep]Alain> My goal is to strip every non-numeric character from a form-entered > telephone number, so the resulting string contains only numeric > digits. Can anyone post a grep that changes every non-numeric > character to blank? > > Sorry, I don't know much about grep, although it seems that grep > would be the best tool to use for this purpose ... > > Thanks. > > > Sincerely, > Kenneth Grome > > --------------------------------------------------- > WebDNA Professional Training and Development Center > 175 J. Llorente Street +63 (32) 255-6921 > Cebu City, Cebu 6000 kengrome@webdna.net > Philippines http://www.webdna.net > --------------------------------------------------- > > ------------------------------------------------------------- > 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://search.smithmicro.com/ -- Alain Russell Blackpepper Interactive alain.russell@blackpepper.co.nz ph. 09 520 6280------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Grep to remove all characters except digits? (Kenneth Grome 2002)
  2. Re: Grep to remove all characters except digits? (Kenneth Grome 2002)
  3. Re: Grep to remove all characters except digits? (Alain Russell 2002)
  4. Re: Grep to remove all characters except digits? (Matthew Bohne 2002)
  5. Grep to remove all characters except digits? (Kenneth Grome 2002)
This will do the trick .. [grep search=[^0-9]&replace=][the_string][/grep]Alain> My goal is to strip every non-numeric character from a form-entered > telephone number, so the resulting string contains only numeric > digits. Can anyone post a grep that changes every non-numeric > character to blank? > > Sorry, I don't know much about grep, although it seems that grep > would be the best tool to use for this purpose ... > > Thanks. > > > Sincerely, > Kenneth Grome > > --------------------------------------------------- > WebDNA Professional Training and Development Center > 175 J. Llorente Street +63 (32) 255-6921 > Cebu City, Cebu 6000 kengrome@webdna.net > Philippines http://www.webdna.net > --------------------------------------------------- > > ------------------------------------------------------------- > 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://search.smithmicro.com/ -- Alain Russell Blackpepper Interactive alain.russell@blackpepper.co.nz ph. 09 520 6280------------------------------------------------------------- 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://search.smithmicro.com/ Alain Russell

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:

Updating a database once per day - An example (1998) Same DB Same Time (2004) RE: Can a database get stomped by simultaneous access? (1997) Dates - Search and Sorting (1999) Date Formats (1997) PIXO support (1997) Keyword search (2004) 2.0 Info (1997) Nested searches (1998) Assigning carts (1998) WebDNA Feature Request (2006) newbies to web, spaces in email address (1998) Erotic Sites (1997) How can I Add several Items into the cart at once? (1997) totals (1997) Limiting user access to .tmpl files (1997) Quiestion (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) dont want to use credit card authorisation yet (2000) webcat- multiple selection in input field (1997)