Re: [WebDNA] Lookup inside grep?...

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106700
interpreted = N
texte = > Hope that someone can give me a hint on how to make this code work: >=20 > [grep search=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D > [lookup = db=3D/db/images.db&lookinfield=3Did_image&value=3D\1&returnfield=3Ddescrip= tion]] > [image]20110606191716[/image] > [/grep] >=20 > The "\1" value is properly replaced in but not under the lookup context = (it remains as "\1"). >=20 > Thank you so much in advance. >=20 > Regards, > --------------------------------------------------- > Cristi=E1n Tapia Smith I am guessing that the lookup evaluates before the grep does, because = webdna evaluates from the inside out... so you may need to redesign your = code to account for that. - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Lookup inside grep?... (Govinda 2011)
  2. Re: [WebDNA] Lookup inside grep?... (William DeVaul 2011)
  3. [WebDNA] Lookup inside grep?... (=?ISO-8859-1?Q?Cristi=E1n_Tapia?= 2011)
> Hope that someone can give me a hint on how to make this code work: >=20 > [grep search=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D > [lookup = db=3D/db/images.db&lookinfield=3Did_image&value=3D\1&returnfield=3Ddescrip= tion]] > [image]20110606191716[/image] > [/grep] >=20 > The "\1" value is properly replaced in but not under the lookup context = (it remains as "\1"). >=20 > Thank you so much in advance. >=20 > Regards, > --------------------------------------------------- > Cristi=E1n Tapia Smith I am guessing that the lookup evaluates before the grep does, because = webdna evaluates from the inside out... so you may need to redesign your = code to account for that. - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk Govinda

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:

More questions about serial number dishing (1997) No Access warning when caching HTML files (1997) shoppingcart reload qty (1997) Authorize Net??? (2002) Bounced Emails (2005) Searching multiple Databases (1997) emailer (1997) [WriteFile] problems (1997) WebCatalog/WebMerchant Manuals Available (1998) WebDNA 4.5.1 on Apache 2.x. (2004) [WebDNA] How to set up new hosting (2013) default value from Lookup (was Grant, please help me) (1997) Error Lob.db records error message not name (1997) b12 cannot limit records returned and more. (1997) Another IfThenElse question.. (2003) WebCat2 several catalogs? (1997) WebCat2: Items xx to xx shown, etc. (1997) all records returned. (1997) grep matching (2003) [format 40s]text[/format] doesn't work (1997)