Re: Re(2): & in grep
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 51109
interpreted = N
texte = on 6/16/2003 10:10 am, laurent pladys at ltpladys-list@lxir.net so noted...> %26 in a grep pattern breaks the result.> atraduire=fr-test1 becomes atraduire=fr-r1> > Is there w way to put the & symbol in a grep, is it possible to escape> it ? \& doesn't work, %28 doens't work ...Well, this is positively evil, but works:[grep search=#&replace=%26][grep search=traduire.([0-9A-Za-z]*)&replace=(includefile=../div/traduction.inc#atraduire=[interpret][lng][/interpret]-\1%5D]traduire=test1
traduire=test2 traduire=test3[/grep][/grep]For some reason, having a url-encoded ampersand in the replace string,messes with saved pattern matches.code:[grep search=(z)&replace=word1(\1)]a b c z d e f z[/grep]result:a b c word1(z) d e f word1(z)--code:[grep search=(z)&replace=word1%26(\1)]a b c z d e f z[/grep]result:a b c word1&(61) d e f word1&(61)--code:[grep search=(z)&replace=word1%26word2 (\1)]a b c z d e f z[/grep]result:a b c word1&word2 ( 1) d e f word1&word2 ( 1)Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.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:
on 6/16/2003 10:10 am, laurent pladys at ltpladys-list@lxir.net so noted...> %26 in a grep pattern breaks the result.> atraduire=fr-test1 becomes atraduire=fr-r1> > Is there w way to put the & symbol in a grep, is it possible to escape> it ? \& doesn't work, %28 doens't work ...Well, this is positively evil, but works:[grep search=#&replace=%26][grep search=traduire.([0-9A-Za-z]*)&replace=(includefile=../div/traduction.inc#atraduire=[interpret][lng][/interpret]-\1%5D]traduire=test1
traduire=test2 traduire=test3[/grep][/grep]For some reason, having a url-encoded ampersand in the replace string,messes with saved pattern matches.code:[grep search=(z)&replace=word1(\1)]a b c z d e f z[/grep]result:a b c word1(z) d e f word1(z)--code:[grep search=(z)&replace=word1%26(\1)]a b c z d e f z[/grep]result:a b c word1&(61) d e f word1&(61)--code:[grep search=(z)&replace=word1%26word2 (\1)]a b c z d e f z[/grep]result:a b c word1&word2 ( 1) d e f word1&word2 ( 1)Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.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/
Rob Marquardt
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:
You *can!!* overwrite username/password using an HTML form. Also, experts *please* see Q at end (2000)
Help Wanted - Stowe, Vermont (1999)
Sort Order on a page search (1997)
WebDelivery downloads alias, not original ? (1997)
How To Install (2003)
Too Much Info (1998)
Generating unique SKU from [cart] (1997)
F3 crashing server (1997)
[shownext] link disappears after first use. Why? - because w/out the formvar, max reset to default (2000)
Potential Conflicts? (1997)
protect tag on NT IIS (1997)
unsubscribe (1997)
Running _every_ page through WebCat-error.html (1997)
[WebDNA] ImageMagick troubleshooting (2009)
Problems with [Applescript] (1997)
Menu to select product variations (1997)
TCP Connect/send and CGI (2003)
NetSplat and WebCat2 (1997)
Items XX to XX shown (1997)
summ=T (2003)