Re: [WebDNA] can webdna's [grep] find and replace ONLY the literal "+" char?

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 109023
interpreted = N
texte = --Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Well spotted :) On 02/05/2012, at 2:52 PM, Govinda wrote: >=20 >> I found this from an old note: >>=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 > from here: >=20 > = --------------------------------------------------------------------------= -------------------------------------- > = --------------------------------------------------------------------------= -------------------------------------- >=20 > From: Govinda > Subject: Re: [WebDNA] GREP problem > Date: 2011-04-21 11:53:44 AM EDT > To: WebDNA talk >=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 > = --------------------------------------------------------------------------= -------------------------------------- > = --------------------------------------------------------------------------= -------------------------------------- >=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 --Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Well = spotted :)



On = 02/05/2012, at 2:52 PM, Govinda wrote:


I found this from an old = note:

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??).

from = here:

-------------------------------------------= ---------------------------------------------------------------------
--------------------------------------------------------------------= --------------------------------------------

= From: = Govinda   <govinda.webdnatalk@gmail.com<= /a>>

Hi Stuart

I got this to work = for = you:

--------------------------------------------------------------= --------------------------
[text]incomingString=3Dabcdefghijklmnopqrstu= vwxyz~!@#$%^&*()_+`-=3D{}|[]\:";'<>?,./ 
1234567890ABCDE= FGHIJKLMNOPQRSTUVWXYZ[/text]

[text]cleanedString=3D[grep = search=3D[URL][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep]= [/text]

incomingString=3D[incomingString]<br/>
cleanedStri= ng=3D[cleanedString]<br/>
---------------------------------------= -------------------------------------------------

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??).

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.)

-G

--------------------------= --------------------------------------------------------------------------= ------------
---------------------------------------------------= -------------------------------------------------------------
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079-- Associated Messages, from the most recent to the oldest:

    
--Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Well spotted :) On 02/05/2012, at 2:52 PM, Govinda wrote: >=20 >> I found this from an old note: >>=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 > from here: >=20 > = --------------------------------------------------------------------------= -------------------------------------- > = --------------------------------------------------------------------------= -------------------------------------- >=20 > From: Govinda > Subject: Re: [WebDNA] GREP problem > Date: 2011-04-21 11:53:44 AM EDT > To: WebDNA talk >=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 > = --------------------------------------------------------------------------= -------------------------------------- > = --------------------------------------------------------------------------= -------------------------------------- >=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 --Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Well = spotted :)



On = 02/05/2012, at 2:52 PM, Govinda wrote:


I found this from an old = note:

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??).

from = here:

-------------------------------------------= ---------------------------------------------------------------------
--------------------------------------------------------------------= --------------------------------------------

= From: = Govinda   <govinda.webdnatalk@gmail.com<= /a>>

Hi Stuart

I got this to work = for = you:

--------------------------------------------------------------= --------------------------
[text]incomingString=3Dabcdefghijklmnopqrstu= vwxyz~!@#$%^&*()_+`-=3D{}|[]\:";'<>?,./ 
1234567890ABCDE= FGHIJKLMNOPQRSTUVWXYZ[/text]

[text]cleanedString=3D[grep = search=3D[url][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep]= [/text]

incomingString=3D[incomingString]<br/>
cleanedStri= ng=3D[cleanedString]<br/>
---------------------------------------= -------------------------------------------------

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??).

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.)

-G

--------------------------= --------------------------------------------------------------------------= ------------
---------------------------------------------------= -------------------------------------------------------------
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_1480FC8C-1FC6-4E9A-828E-12397C575079-- Stuart Tremain

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:

OT - SMSI complaint (2001) Any WebCatalog Server providers in Seattle? (1998) [redirect..] (2006) Re[3]: 2nd WebCatalog2 Feature Request (1996) Keep away (1997) Frames and WebCat (1997) multiple search commands (1997) New Lawsuit Alleges Unitedhealth/Pacificare Deceived (2006) WebDelivery downloads alias, not original ? (1997) WCS Newbie question (1997) [protect] on NT? (1997) On AOL Account Security: Fwd: POSSIBLE PROBLEMS FOR AOL USERS (1998) Multiple Pulldowns (1997) Price problem (1997) Problem during evaluation of WebCatalog (1998) Setting up shop (1997) Strange time in emails (2003) lookups or math? (1998) Setting up WebCatalog with Retail Pro data (1996) Been meaning to ask... (1997)