Re: How do I specify a & character in Grep?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34133
interpreted = N
texte = >http://www.domain.com/firstfolder/secondfolder/filename.html?blah=1&?blah2=2This is not a proper URL -- it contains more than one question mark. A single question mark is the delimiter between the path and the parameters. So it's possible to parse a normal URL apart without needing grep.>My question still stands. I want to know if the Grep tag is not >true regex or is there a way to identify and use & in the grep >expressions. > >It shouldn't be called grep if you can't do real regex stuff in it. >Maybe it should be called Grep is a good name for marketing >purposes but it isn't really the same.Chill, dude, this is not a conspiracy, it's just a simple syntax question. The answer was already presented with the use of the [url] context: embedded ampersands and other special characters in URLs are represented as their HEX-escaped equivalents. In the case of ampersand, the equivalent code is %26. You can automate this by wrapping [url]...[/url] around any text which needs to be passed as a parameter to *any* WebDNA context, not just grep.The general solution to any problem like this is to wrap every parameter inside [url]:[grep search=[url]...some text here which may contain ampersand...[/url]&replace=[url]...[/url]]...[/grep]This ensures that any 'special' characters get passed thru without modification or misinterpretation. Ampersands as delimiters was not our invention: it's how browsers send URLs to servers, and we purposely chose it so as to keep things consistent for web programmers who are already accustomed to URLs.Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: How do I specify a & character in Grep? (Kim Ingram 2000)
  2. Re: How do I specify a & character in Grep? (John Butler 2000)
  3. Re: How do I specify a & character in Grep? (Kim Ingram 2000)
  4. Re: How do I specify a & character in Grep? (WebDNA Support 2000)
  5. Re: How do I specify a & character in Grep? (Webcat 2000)
  6. Re: How do I specify a & character in Grep? (Webcat 2000)
  7. Re: How do I specify a & character in Grep? (WebDNA Support 2000)
  8. Re: How do I specify a & character in Grep? (Webcat 2000)
  9. Re: How do I specify a & character in Grep? (Kenneth Grome 2000)
  10. Re: How do I specify a & character in Grep? (Webcat 2000)
  11. Re: How do I specify a & character in Grep? (John Butler 2000)
  12. How do I specify a & character in Grep? (Webcat 2000)
>http://www.domain.com/firstfolder/secondfolder/filename.html?blah=1&?blah2=2This is not a proper URL -- it contains more than one question mark. A single question mark is the delimiter between the path and the parameters. So it's possible to parse a normal URL apart without needing grep.>My question still stands. I want to know if the Grep tag is not >true regex or is there a way to identify and use & in the grep >expressions. > >It shouldn't be called grep if you can't do real regex stuff in it. >Maybe it should be called Grep is a good name for marketing >purposes but it isn't really the same.Chill, dude, this is not a conspiracy, it's just a simple syntax question. The answer was already presented with the use of the [url] context: embedded ampersands and other special characters in URLs are represented as their HEX-escaped equivalents. In the case of ampersand, the equivalent code is %26. You can automate this by wrapping [url]...[/url] around any text which needs to be passed as a parameter to *any* WebDNA context, not just grep.The general solution to any problem like this is to wrap every parameter inside [url]:[grep search=[url]...some text here which may contain ampersand...[/url]&replace=[url]...[/url]]...[/grep]This ensures that any 'special' characters get passed thru without modification or misinterpretation. Ampersands as delimiters was not our invention: it's how browsers send URLs to servers, and we purposely chose it so as to keep things consistent for web programmers who are already accustomed to URLs.Technical Support ********************************** Smith Micro, Internet Solutions Div | eCommerce (WebCatalog) 16855 West Bernardo Drive, #380 | ------------------------- San Diego, CA 92127 | Software & Site Development WebCatalog Support: (858) 675-0632 | http://www.smithmicro.com Fax: (858) 675-0372 **********************************------------------------------------------------------------- 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://search.smithmicro.com/ WebDNA Support

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 wholesale ... (2002) [CART] inside a [LOOP] (1997) [WebDNA] macOS 10.13.3 and WebDNA Mac Server 8.5.1 - hick-up (2019) raw=T is broken in [include] (1997) [SHOWIF AND/OR] (1997) WebCat editing, SiteGuard & SiteEdit (1997) Expected Behavior? (1999) Unexpected error (1997) Sorting by date (1997) WebDNA error. (2006) WebCat2b12 - New features for 1.6 users ... (1997) Web Catalog 2 demo (1997) What does this error mean? (2000) Adding a month and the 31st (bug?) (2002) Secure server question (1997) unsubscribe (1997) [UPPERCASE] (1997) possible, WebCat2.0 and checkboxes-restated (1997) Nested Loops and SHOWIFs (1997) 'does not contain' operator needed ... (1997)