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=(include file=../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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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:

    
  1. Re(2): lookup limitation ? (laurent pladys 2003)
  2. Re: Re(2): & in grep (Rob Marquardt 2003)
  3. Re: Re(2): & in grep (Brian Fries 2003)
  4. Re(2): & in grep (laurent pladys 2003)
  5. Re: Re(2): grep matching (Brian Fries 2003)
  6. Re: Re(2): typhoon ? (dale 2003)
  7. Re: Re(2): typhoon ? (Brian Boegershausen 2003)
  8. Re: Re(2): typhoon ? (Mark Derrick 2003)
  9. Re: Re(2): MASTER_STORE revision (Dan Strong 2002)
  10. Re: Re(2): MASTER_STORE revision (Alain Russell 2002)
  11. Re: Re(2): Foreign Chars ( יאצה and so on) (richard 1998)
  12. Fwd: Re(2): Password and Allow commands (l.bache@interacti-system.fr (Laurent Bache) 1998)
  13. Re(2): Re(2): SSL, WebSTAR, WebCatalog (l.bache@interacti-system.fr (Laurent Bache) 1998)
  14. Re: Re(2): SSL, WebSTAR, WebCatalog (Pat McCormick 1998)
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=(include file=../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 Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.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:

[Announce] Newest Commerce Site based on WebCatalog (1997) Showif, Hideif reverse logic ? (1997) Force a search at the default.tmpl page? (1997) Problems with ^ could be solved with [REPLACE CHARACTERS] (1997) Every other record deleted (2005) converting tabs (1997) emailer (1997) [ShowNext] feature in 2.0 (1997) Order Date (2003) Re:E-Mailer (WebCatb15acgiMac) (1997) Displaying text and populating form fields (again) (2005) syntax question, not in online refernce (1997) Deleting Orders (1997) Emailer prefs in two places ... (1997) Car Database (2002) Setting up WebCatalog with Retail Pro data (1996) Spontaneous Errors (2004) WebMerchant 1.6 and SHTML (1997) [carts] and databases (1997) Problem (1997)