Re: [WebDNA] Lookup inside grep?...
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106699
interpreted = N
texte = I'm not sure but am guessing that the back reference \1 is notsubstituted in the lookup tag. Here's slightly different code thatmight work:[text]image_id=3D[grepsearch=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D\1][image]20=110606191716[/image][/grep][/text]
[lookupdb=3D/db/images.db&lookinfield=3Did_image&value=3D[image_id]&returnfield=3D=description]On Mon, Jun 6, 2011 at 8:16 PM, Cristi=E1n Tapia
wro=te:> Hello everyone,>> Hope that someone can give me a hint on how to make this code work:>> [grep search=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D src=3D"/media/images/\1.jpg">> [lookup> db=3D/db/images.db&lookinfield=3Did_image&value=3D\1&returnfield=3Ddescri=ption]]> [image]20110606191716[/image]> [/grep]>> The "\1" value is properly replaced in src=3D/media/images/20110606191716.jpg> but not under the lookup context =(it> remains as "\1").>> Thank you so much in advance.>> Regards,> ---------------------------------------------------> Cristi=E1n Tapia Smith> Lemon Internet S.A.> ctapia@lemongroup.cl> http://www.lemongroup.cl> Antonia L=F3pez de Bello 172, Of. 801> Fono: +562-7777542> Santiago, Chile.>> ---------------------------------------------------------> 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> Bug Reporting: support@webdna.us>
Associated Messages, from the most recent to the oldest:
I'm not sure but am guessing that the back reference \1 is notsubstituted in the lookup tag. Here's slightly different code thatmight work:[text]image_id=3D[grepsearch=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D\1][image]20=110606191716[/image][/grep][/text][lookupdb=3D/db/images.db&lookinfield=3Did_image&value=3D[image_id]&returnfield=3D=description]On Mon, Jun 6, 2011 at 8:16 PM, Cristi=E1n Tapia wro=te:> Hello everyone,>> Hope that someone can give me a hint on how to make this code work:>> [grep search=3D\[image\]([^[unurl]%5B[/unurl]]*)\[/image\]&replace=3D src=3D"/media/images/\1.jpg">> [lookup> db=3D/db/images.db&lookinfield=3Did_image&value=3D\1&returnfield=3Ddescri=ption]]> [image]20110606191716[/image]> [/grep]>> The "\1" value is properly replaced in src=3D/media/images/20110606191716.jpg> but not under the lookup context =(it> remains as "\1").>> Thank you so much in advance.>> Regards,> ---------------------------------------------------> Cristi=E1n Tapia Smith> Lemon Internet S.A.> ctapia@lemongroup.cl> http://www.lemongroup.cl> Antonia L=F3pez de Bello 172, Of. 801> Fono: +562-7777542> Santiago, Chile.>> ---------------------------------------------------------> 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> Bug Reporting: support@webdna.us>
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:
[WebDNA] Sorry WebDNA server not running /Template ERROR/ Slow (2019)
Shownext problems (1999)
[OT] DOD (2002)
Re:Searching for ALL / empty form field (1997)
emailer (1997)
Bug or syntax error on my part? (1997)
Another question (1997)
[WriteFile] problems (1997)
[WebDNA] WebDNA 8.6.4 (2020)
[WebDNA] Triggers not working (2011)
[url] - question (2000)
Cart Creation (1998)
Multiple Users.db Possible? (1997)
Serving images from databases (1998)
[CART] inside a [LOOP] (1997)
2.01 upgrade problems (1997)
Not really WebCat- (1997)
WebCat2_Mac RETURNs in .db (1997)
[cart] not being interpreted inside [founditems] (1997)
writefile, csv, tab and excel import behavior (2004)