Re: grep matching

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 47893
interpreted = N
texte = %5B (open square bracket) works, but %5D (close square bracket) doesn't work inside a character list.I tried the following:[grep search=[%5B]&replace=#]abc[def]ghi[/grep] results: abc#def]ghi - Success[grep search=[%5B%5D]&replace=#]abc[def]ghi[/grep] results: abc[def]ghi - Failure[grep search=%5B&replace=#]abc[def]ghi[/grep] Totally empty result page - Failure[grep search=\%5B&replace=#]abc[def]ghi[/grep] results: abc#def]ghi - Success[grep search=%5D&replace=#]abc[def]ghi[/grep] results: abc[def#ghi - Success[grep search=\%5D&replace=#]abc[def]ghi[/grep] results: abc[def#ghi - Success It looks to me like WebDNA is incorrectly parsing the URL-encoded square brackets in some cases.For what I was trying to do - find any character except a closing square bracket - there appears to be no direct way to do it. I had similar problems the other day trying to GREP search for %0A characters within a character list. In both cases, the workaround was to first replace the offending character with a simple substitution for a character that would work in the character list.- brian It looks to me like WebDNA's parser is treating theOn Wednesday, February 19, 2003, at 12:14 PM, Rob Marquardt wrote:> on 2/19/03 12:59 PM, Brian Fries at webdna@brainscansoftware.com so > noted... > >> I tried everything I could think of to be able to search for an end >> square bracket within a character list (delimited by [] in grep), but >> it will not work. I can search for the character by itself, and I can >> make it work in a character list in BBEdit, but I can't make it work >> in >> WebDNA. > > I've done [unurl]%5B[/unurl] before. It's definitely voodoo getting > them to > work. > > > Rob Marquardt > Designer/Resident Wirehead > Toast Design > > 800 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/ > ------------------------------------------------------------- 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(4): grep matching (laurent pladys 2003)
  2. Re: Re(2): grep matching (Brian Fries 2003)
  3. Re(2): grep matching (laurent pladys 2003)
  4. Re: grep matching (Brian Fries 2003)
  5. Re: grep matching (Rob Marquardt 2003)
  6. Re: grep matching (Brian Fries 2003)
  7. grep matching (laurent pladys 2003)
%5B (open square bracket) works, but %5D (close square bracket) doesn't work inside a character list.I tried the following:[grep search=[%5B]&replace=#]abc[def]ghi[/grep] results: abc#def]ghi - Success[grep search=[%5B%5D]&replace=#]abc[def]ghi[/grep] results: abc[def]ghi - Failure[grep search=%5B&replace=#]abc[def]ghi[/grep] Totally empty result page - Failure[grep search=\%5B&replace=#]abc[def]ghi[/grep] results: abc#def]ghi - Success[grep search=%5D&replace=#]abc[def]ghi[/grep] results: abc[def#ghi - Success[grep search=\%5D&replace=#]abc[def]ghi[/grep] results: abc[def#ghi - Success It looks to me like WebDNA is incorrectly parsing the URL-encoded square brackets in some cases.For what I was trying to do - find any character except a closing square bracket - there appears to be no direct way to do it. I had similar problems the other day trying to GREP search for %0A characters within a character list. In both cases, the workaround was to first replace the offending character with a simple substitution for a character that would work in the character list.- brian It looks to me like WebDNA's parser is treating theOn Wednesday, February 19, 2003, at 12:14 PM, Rob Marquardt wrote:> on 2/19/03 12:59 PM, Brian Fries at webdna@brainscansoftware.com so > noted... > >> I tried everything I could think of to be able to search for an end >> square bracket within a character list (delimited by [] in grep), but >> it will not work. I can search for the character by itself, and I can >> make it work in a character list in BBEdit, but I can't make it work >> in >> WebDNA. > > I've done [unurl]%5B[/unurl] before. It's definitely voodoo getting > them to > work. > > > Rob Marquardt > Designer/Resident Wirehead > Toast Design > > 800 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/ > ------------------------------------------------------------- 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/ Brian Fries

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:

unique ascending numbers (2003) HideIf ip= OR ip (1998) Fufillment e-mail? (1998) Classified Ads 4 Sale (1998) [WebDNA] Subtotal of SKU's that begin with ... (2009) [WebDNA] random blank results? how come? (2014) [BoldWords] WebCat.acgib15Mac (1997) WebTen and WebCat (1997) Temp license (2005) Exclamation point (1997) Re2: Calculating multiple shipping... (1997) select multiple 2 more cents (1997) [WebDNA] Non-numbers entered into a field that asks for a number (2008) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) question: back button prevention (1997) Emailer setup (1997) [LOOKUP] (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) [OT] MS Security Flaw (2000) WebDelivery: One step closer !! (1997)