Re: Grep and convertchars

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 53866
interpreted = N
texte = You could wrap the entire grep context in the convertchars: [convertchars db=3Dchangemail.db][grep ...]thetext[/grep][/convertchars] ....but that would convertchars on the full text, not just the email =20 addresses. The solution may be to embed the convertchars context in the grep =20 output, then interpret the whole thing: [interpret][grep search=3D...&replace=3D[url]%5Bconvertchars =20 db=3Dchangemail.db%5D\1%5B/convertchars%5D[/url]]thetext[/grep][/=20 interpret] This grep will result in (if I got the code right) something like: blah blah [convertchars db=3Dchangemail.db]bob@bob.com[/convertchars] =20= blah blah ....then the interpret will process the convertchars context. You need to be sure that the rest of the text doesn't contain any DNA =20= code that would also get executed by the interpret and may cause damage. - brian On Thursday, November 6, 2003, at 05:45 AM, Nitai @ ComputerOil wrote: > Hi all > > Somehow I cant get grep to work properly. > > I need to change every email address on a text and convert it. So =20 > doing a: > > [grep search=3D([A-z0-9_\-\.]*@[A-z0-9_\-\.][A-z0-9_\-\.]*)&replace=3D\1= ] > > Works fine. But then when trying to use this: > > [grep > search=3D([A-z0-9_\-\.]*@[A-z0-9_\-\.][A-z0-9_\-=20 > \.]*)&replace=3D[ConvertChars > db=3Dchangemail.db]\1[/ConvertChars]] > > It fails. I guess my logic behind this fails, right? WebDNa can not be = =20 > used > on a grep pattern or alike. > > Any other solution? I need to find every email address in a text and =20= > change > it. I thought grep would do the job. > > Nitai > > -- > Redakto - Content Management that simply works > > ComputerOil=AE GmbH > Unionstrasse 4 > 8032 Z=FCrich / Switzerland > Telefon +41 (0)844 44 55 66 > > info@computeroil.com > http://computeroil.com > > > > > ------------------------------------------------------------- > 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 =20 > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Grep and convertchars ( Brian Fries 2003)
  2. Re: Grep and convertchars ( devaulw@onebox.com 2003)
  3. Grep and convertchars ( "Nitai @ ComputerOil" 2003)
You could wrap the entire grep context in the convertchars: [convertchars db=3Dchangemail.db][grep ...]thetext[/grep][/convertchars] ....but that would convertchars on the full text, not just the email =20 addresses. The solution may be to embed the convertchars context in the grep =20 output, then interpret the whole thing: [interpret][grep search=3D...&replace=3D[url]%5Bconvertchars =20 db=3Dchangemail.db%5D\1%5B/convertchars%5D[/url]]thetext[/grep][/=20 interpret] This grep will result in (if I got the code right) something like: blah blah [convertchars db=3Dchangemail.db]bob@bob.com[/convertchars] =20= blah blah ....then the interpret will process the convertchars context. You need to be sure that the rest of the text doesn't contain any DNA =20= code that would also get executed by the interpret and may cause damage. - brian On Thursday, November 6, 2003, at 05:45 AM, Nitai @ ComputerOil wrote: > Hi all > > Somehow I cant get grep to work properly. > > I need to change every email address on a text and convert it. So =20 > doing a: > > [grep search=3D([A-z0-9_\-\.]*@[A-z0-9_\-\.][A-z0-9_\-\.]*)&replace=3D\1= ] > > Works fine. But then when trying to use this: > > [grep > search=3D([A-z0-9_\-\.]*@[A-z0-9_\-\.][A-z0-9_\-=20 > \.]*)&replace=3D[ConvertChars > db=3Dchangemail.db]\1[/ConvertChars]] > > It fails. I guess my logic behind this fails, right? WebDNa can not be = =20 > used > on a grep pattern or alike. > > Any other solution? I need to find every email address in a text and =20= > change > it. I thought grep would do the job. > > Nitai > > -- > Redakto - Content Management that simply works > > ComputerOil=AE GmbH > Unionstrasse 4 > 8032 Z=FCrich / Switzerland > Telefon +41 (0)844 44 55 66 > > info@computeroil.com > http://computeroil.com > > > > > ------------------------------------------------------------- > 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 =20 > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- 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://webdna.smithmicro.com/ Brian Fries

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:

calender with business days (1998) Support ?? (1997) upgrading (1997) Exclamation point (1997) displaying New products (using [date]) (1997) [WebDNA] sudo and shell (2010) [protect admin] (1997) Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997) Thanks Grant (1997) table import function crashes server (2008) Hyperboard users wanting a quoted message (1998) [ShowNext] (1997) FTP Problem (2005) problems with WebCat-Plugin () Looking for a Manual (1997) Nitro plugin? (1998) RE: Webcatalog and CyberSTUD (1998) Wierd thing in ViewOrder.tpl (1999) Listserver problem (1997) HTTP header line is too long? (1997)