Re: [WebDNA] Grep everything and replace with asterisks?

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105084
interpreted = N
texte = This is a multi-part message in MIME format. ------=_NextPart_000_00BA_01CAC9B3.38C405A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Oh, and I also know I can explicitly tell grep what to find: [grep search=3D[!@#$%^&*()-?|/\]&replace=3D*]h4tdb!@6889gfd[/grep] but that seems like overkill... I am just looking for the most elegant = solution here. -Dan From: Dan Strong=20 Sent: Monday, March 22, 2010 11:26 AM To: talk@webdna.us=20 Subject: [WebDNA] Grep everything and replace with asterisks? I want to take a string and replace everything in it with asterisks. = None of these work: [grep search=3D[*]&replace=3D*]h4tdb!@6889gfd[/grep] [grep search=3D[ ]&replace=3D*]h4tdb!@6889gfd[/grep] [grep search=3D[url][ ][/url]&replace=3D*]h4tdb!@6889gfd[/grep] I know how to do a grep that replaces all letters and numbers, but what = about other symbols and such (@, etc.)? I suppose I could do a [countchars] on the input then replace with that = many asterisks, but it just seems like this is exactly the kind of job = that grep is for. Not terribly important, but now I'm curious how it can be done. Thanks, -Dan ------=_NextPart_000_00BA_01CAC9B3.38C405A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Oh, and I also know I can explicitly = tell grep what=20 to find:
[grep=20 search=3D[!@#$%^&*()-?|/\]&replace=3D*]h4tdb!@6889gfd[/grep]
 
but that seems like overkill... I am = just looking=20 for the most elegant solution here.
-Dan

From: Dan Strong
Sent: Monday, March 22, 2010 11:26 AM
To: talk@webdna.us
Subject: [WebDNA] Grep everything and replace with=20 asterisks?

I want to take a string and replace = everything in=20 it with asterisks. None of these work:
 
[grep=20 search=3D[*]&replace=3D*]h4tdb!@6889gfd[/grep]
[grep search=3D[=20 ]&replace=3D*]h4tdb!@6889gfd[/grep]
[grep search=3D[url][=20 ][/url]&replace=3D*]h4tdb!@6889gfd[/grep]
 
I know how to do a grep that replaces = all letters=20 and numbers, but what about other symbols and such (@, = etc.)?
 
I suppose I could do a [countchars] on = the input=20 then replace with that many asterisks, but it just seems like this is = exactly=20 the kind of job that grep is for.
 
Not terribly important, but now I'm = curious how it=20 can be done.
 
Thanks,
-Dan
------=_NextPart_000_00BA_01CAC9B3.38C405A0-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Grep everything and replace with asterisks? ("Terry Wilson" 2010)
  2. Re: [WebDNA] Grep everything and replace with asterisks? (Govinda 2010)
  3. Re: [WebDNA] Grep everything and replace with asterisks? ("Dan Strong" 2010)
  4. Re: [WebDNA] Grep everything and replace with asterisks? (Bob Minor 2010)
  5. Re: [WebDNA] Grep everything and replace with asterisks? ("Dan Strong" 2010)
  6. Re: [WebDNA] Grep everything and replace with asterisks? (Marc Thompson 2010)
  7. Re: [WebDNA] Grep everything and replace with asterisks? ("Dan Strong" 2010)
  8. Re: [WebDNA] Grep everything and replace with asterisks? (Marc Thompson 2010)
  9. Re: [WebDNA] Grep everything and replace with asterisks? ("Dan Strong" 2010)
  10. [WebDNA] Grep everything and replace with asterisks? ("Dan Strong" 2010)
This is a multi-part message in MIME format. ------=_NextPart_000_00BA_01CAC9B3.38C405A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Oh, and I also know I can explicitly tell grep what to find: [grep search=3D[!@#$%^&*()-?|/\]&replace=3D*]h4tdb!@6889gfd[/grep] but that seems like overkill... I am just looking for the most elegant = solution here. -Dan From: Dan Strong=20 Sent: Monday, March 22, 2010 11:26 AM To: talk@webdna.us=20 Subject: [WebDNA] Grep everything and replace with asterisks? I want to take a string and replace everything in it with asterisks. = None of these work: [grep search=3D[*]&replace=3D*]h4tdb!@6889gfd[/grep] [grep search=3D[ ]&replace=3D*]h4tdb!@6889gfd[/grep] [grep search=3D[url][ ][/url]&replace=3D*]h4tdb!@6889gfd[/grep] I know how to do a grep that replaces all letters and numbers, but what = about other symbols and such (@, etc.)? I suppose I could do a [countchars] on the input then replace with that = many asterisks, but it just seems like this is exactly the kind of job = that grep is for. Not terribly important, but now I'm curious how it can be done. Thanks, -Dan ------=_NextPart_000_00BA_01CAC9B3.38C405A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Oh, and I also know I can explicitly = tell grep what=20 to find:
[grep=20 search=3D[!@#$%^&*()-?|/\]&replace=3D*]h4tdb!@6889gfd[/grep]
 
but that seems like overkill... I am = just looking=20 for the most elegant solution here.
-Dan

From: Dan Strong
Sent: Monday, March 22, 2010 11:26 AM
Subject: [WebDNA] Grep everything and replace with=20 asterisks?

I want to take a string and replace = everything in=20 it with asterisks. None of these work:
 
[grep=20 search=3D[*]&replace=3D*]h4tdb!@6889gfd[/grep]
[grep search=3D[=20 ]&replace=3D*]h4tdb!@6889gfd[/grep]
[grep search=3D[url][=20 ][/url]&replace=3D*]h4tdb!@6889gfd[/grep]
 
I know how to do a grep that replaces = all letters=20 and numbers, but what about other symbols and such (@, = etc.)?
 
I suppose I could do a [countchars] on = the input=20 then replace with that many asterisks, but it just seems like this is = exactly=20 the kind of job that grep is for.
 
Not terribly important, but now I'm = curious how it=20 can be done.
 
Thanks,
-Dan
------=_NextPart_000_00BA_01CAC9B3.38C405A0-- "Dan Strong"

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:

Separate SSL Server (1997) CC and Europe (1999) Emailer on NT CAN'T handle large email files (1997) Word Bolding (1996) WebCatalog Mac 2.1b3 (1997) Tech support (2000) PROTECT Q (2000) [OT] Discussion forum, last visit, Cookie, ... (2003) Bulk Email >>>>Any ideas? (2001) WebCat2 - [format thousands] (1997) WebDNA Solutions ... sorry! (1997) Stopping bad HTML propagation ? (1997) Mine Headers for E-mail (1998) Bug Report, maybe (1997) show all problem (1997) Dynamic Form - Shipping Country / State/ Province (2006) Getting Emailer to send mail (1997) PCS Frames (1997) Error:Too many nested [xxx] contexts (1997) [WebDNA] [OT] potential cheap WebDNA server? (2009)