Re(2): & in grep
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 51107
interpreted = N
texte = >>Is there a way to encode & in the %XX form as we do for [ and ] ?>>The encoded value of & is %26Thanks Ken, I tried that but it still doesn't work.%26 in a grep pattern breaks the result.atraduire=fr-test1 becomes atraduire=fr-r1Is there w way to put the & symbol in a grep, is it possible to escapeit ? \& doesn't work, %28 doens't work ...I changed the first opening square bracket on purpose so it shows up.Here are the result with %26 and a # to comppare what happens.When using :[writefile secure=F&file=../[langue]/[refpage].c-lvl][grep search=traduire.([0-9A-Za-z]*)&replace=(include file=../div/traduction.inc%26atraduire=[interpret][lng][/interpret]-\1%5D][include file=../pages/[word].c-lvl&valeuridmultiple=[newnumero]][/grep][/writefile]I have this :include file=../div/traduction.inc&atraduire=fr-r1] (include file=../div/traduction.inc&atraduire=fr-r1] (include file=../div/traduction.inc&atraduire=fr-r1] And when I write this :[writefile secure=F&file=../[langue]/[refpage].c-lvl][grep search=traduire.([0-9A-Za-z]*)&replace=(include file=../div/traduction.inc#atraduire=[interpret][lng][/interpret]-\1%5D][include file=../pages/[word].c-lvl&valeuridmultiple=[newnumero]][/grep][/writefile]I have this :(include file=../div/traduction.inc#atraduire=fr-test1] (include file=../div/traduinclude file=../div/traduction.inc#atraduire=fr-test1ction.inc#atraduire=fr-test2] (includefile=../div/traduction.inc#atraduire=fr-test3] In the file I am including I have the following text :traduire=test1
traduire=test2 traduire=test3That I expect the grep search to replace with :include file=../div/traduction.inc&atraduire=fr-test1
include file=../div/traduction.inc&atraduire=fr-test2 include file=../div/traduction.inc&atraduire=fr-test3-------------------------------------------------------------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:
>>Is there a way to encode & in the %XX form as we do for [ and ] ?>>The encoded value of & is %26Thanks Ken, I tried that but it still doesn't work.%26 in a grep pattern breaks the result.atraduire=fr-test1 becomes atraduire=fr-r1Is there w way to put the & symbol in a grep, is it possible to escapeit ? \& doesn't work, %28 doens't work ...I changed the first opening square bracket on purpose so it shows up.Here are the result with %26 and a # to comppare what happens.When using :[writefile secure=F&file=../[langue]/[refpage].c-lvl][grep search=traduire.([0-9A-Za-z]*)&replace=(include file=../div/traduction.inc%26atraduire=[interpret][lng][/interpret]-\1%5D][include file=../pages/[word].c-lvl&valeuridmultiple=[newnumero]][/grep][/writefile]I have this :include file=../div/traduction.inc&atraduire=fr-r1] (include file=../div/traduction.inc&atraduire=fr-r1] (include file=../div/traduction.inc&atraduire=fr-r1] And when I write this :[writefile secure=F&file=../[langue]/[refpage].c-lvl][grep search=traduire.([0-9A-Za-z]*)&replace=(include file=../div/traduction.inc#atraduire=[interpret][lng][/interpret]-\1%5D][include file=../pages/[word].c-lvl&valeuridmultiple=[newnumero]][/grep][/writefile]I have this :(include file=../div/traduction.inc#atraduire=fr-test1] (include file=../div/traduinclude file=../div/traduction.inc#atraduire=fr-test1ction.inc#atraduire=fr-test2] (includefile=../div/traduction.inc#atraduire=fr-test3] In the file I am including I have the following text :traduire=test1
traduire=test2 traduire=test3That I expect the grep search to replace with :include file=../div/traduction.inc&atraduire=fr-test1
include file=../div/traduction.inc&atraduire=fr-test2 include file=../div/traduction.inc&atraduire=fr-test3-------------------------------------------------------------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/
laurent pladys
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:
Link with [cart] in db field (1999)
emailer and bad addresses (1997)
2nd Request for help/advice on variable pricing (2000)
Here we go again... (2006)
Date Calulation (1997)
Installation webCatalog (French speakers please help) (1998)
orderfile location (1999)
[quantity] - spoke too soon (1997)
Fun with [middle] (2002)
webcat2b12 CGI -- Date comparisons (1997)
Webcat2, WebCommerce, Mod 10 etc. (1997)
Search for 20 finds 2000, 200 Why? (1997)
wo search help (1999)
[WebDNA] [OT] BBEdit Glossary (2012)
FTP and [shell] (2003)
Monitoring Script (2008)
WebCommerce: Folder organization ? (1997)
Formating found categories (1997)
Country & Ship-to address & other fields ? (1997)
listfiles, moving files (1998)