Re: [WebDNA] GREP problem

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106564
interpreted = N
texte = Stuart - I have been doing a bunch of grep lately.. and it always ends = up working somehow..but not before requiring alot of beating! ;-) ..and luck. Brian - yeah.. < :-) sigh> > Thanks Govinda !!! >=20 > There seems to be a few little surprises in the WebDNA grep, this is = one of them !! >=20 >=20 > On 22/04/2011, at 1:53 AM, Govinda wrote: >=20 >> Hi Stuart >>=20 >> I got this to work for you: >>=20 >> = --------------------------------------------------------------------------= -------------- >> = [text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:= ";'<>?,./=20 >> 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] >>=20 >> [text]cleanedString=3D[grep = search=3D[URL][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep][/te= xt] >>=20 >> incomingString=3D[incomingString]
>> cleanedString=3D[cleanedString]
>> = --------------------------------------------------------------------------= -------------- >>=20 >> It seems in webdna's grep.. that the "+" char can go anywhere that = makes sense *except* at the end of the Character Class (which causes = the whole script to fail) (reason??). >>=20 >> Also if I did not wrap the search string with [URL], then that also = failed in the sense that the + was not treated as a literal "+". >> (Lucky us in this case we did not need the "+" to behave as a = quantifier char, which may have opened up another can of worms.) >>=20 >> -G >>=20 >> On 2011-04-20, at 10:45 PM, Stuart Tremain wrote: >>=20 >>> Some help with this please. >>>=20 >>> I am using this: >>>=20 >>> [grep search=3D([^a-zA-Z0-9_-])&replace=3D]string[/grep] >>>=20 >>> on this: >>>=20 >>> abcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:";'<>?,./=20 >>> 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ >>> ^^^ Note the CR and the space above >>>=20 >>> to produce this: >>> abcdefghijklmnopqrstuvwxyz_-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ >>>=20 >>>=20 >>> All happy so far, but I also want to return the plus sign "+", I = tried ([^a-zA-Z0-9_-\+]) and other combinations but cant seem to make it = work properly. >>>=20 >>> Any ideas ?? >>>=20 >>>=20 >>>=20 >>> Regards >>>=20 >>> Stuart Tremain >>> IDFK Web Developments >>> AUSTRALIA >>> webdna@idfk.com.au >>>=20 >>>=20 >>>=20 >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> - Govinda >> -------------- >> Old WebDNA talklist archives: >> http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] GREP problem (Govinda 2011)
  2. Re: [WebDNA] GREP problem (Stuart Tremain 2011)
  3. Re: [WebDNA] GREP problem (Govinda 2011)
  4. Re: [WebDNA] GREP problem (William DeVaul 2011)
  5. [WebDNA] GREP problem (Stuart Tremain 2011)
  6. Re: [WebDNA] Grep problem (William DeVaul 2010)
  7. [WebDNA] Grep problem (Kenneth Grome 2010)
Stuart - I have been doing a bunch of grep lately.. and it always ends = up working somehow..but not before requiring alot of beating! ;-) ..and luck. Brian - yeah.. < :-) sigh> > Thanks Govinda !!! >=20 > There seems to be a few little surprises in the WebDNA grep, this is = one of them !! >=20 >=20 > On 22/04/2011, at 1:53 AM, Govinda wrote: >=20 >> Hi Stuart >>=20 >> I got this to work for you: >>=20 >> = --------------------------------------------------------------------------= -------------- >> = [text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:= ";'<>?,./=20 >> 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] >>=20 >> [text]cleanedString=3D[grep = search=3D[url][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep][/te= xt] >>=20 >> incomingString=3D[incomingString]
>> cleanedString=3D[cleanedString]
>> = --------------------------------------------------------------------------= -------------- >>=20 >> It seems in webdna's grep.. that the "+" char can go anywhere that = makes sense *except* at the end of the Character Class (which causes = the whole script to fail) (reason??). >>=20 >> Also if I did not wrap the search string with [url], then that also = failed in the sense that the + was not treated as a literal "+". >> (Lucky us in this case we did not need the "+" to behave as a = quantifier char, which may have opened up another can of worms.) >>=20 >> -G >>=20 >> On 2011-04-20, at 10:45 PM, Stuart Tremain wrote: >>=20 >>> Some help with this please. >>>=20 >>> I am using this: >>>=20 >>> [grep search=3D([^a-zA-Z0-9_-])&replace=3D]string[/grep] >>>=20 >>> on this: >>>=20 >>> abcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:";'<>?,./=20 >>> 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ >>> ^^^ Note the CR and the space above >>>=20 >>> to produce this: >>> abcdefghijklmnopqrstuvwxyz_-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ >>>=20 >>>=20 >>> All happy so far, but I also want to return the plus sign "+", I = tried ([^a-zA-Z0-9_-\+]) and other combinations but cant seem to make it = work properly. >>>=20 >>> Any ideas ?? >>>=20 >>>=20 >>>=20 >>> Regards >>>=20 >>> Stuart Tremain >>> IDFK Web Developments >>> AUSTRALIA >>> webdna@idfk.com.au >>>=20 >>>=20 >>>=20 >>>=20 >>> --------------------------------------------------------- This = message is sent to you because you are subscribed to the mailing list . = To unsubscribe, E-mail to: archives: = http://mail.webdna.us/list/talk@webdna.us Bug Reporting: = support@webdna.us >>=20 >> - Govinda >> -------------- >> Old WebDNA talklist archives: >> http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >>=20 >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk Govinda

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:

listfiles sort?! (2005) Access Denied! But why? (1997) New NT betas available (1997) Most Recent version of WebDNA For RH ES (2006) SKU lookup (1997) [WebDNA] Limts? -and- Hot Merge (2009) Multiple email troubles (solved) (2001) Grep Help (2003) [shownext] and descending order (1997) Back to Authnet with storebuilder (2003) suffix mapping, use of cache, etc. (1997) Email within tmpl ? (1997) Purchase Plugin Missing (1996) Running _every_ page through WebCat ? (1997) user flush db (2002) Multithreading of [replace] (1999) upload pictures any solution (1999) WebCat Error Log problem (2.0.1, acgi, Mac) (1997) Email (1998) Reversing [ipaddress] normalization (1998)