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 = 109022
interpreted = N
texte = --Apple-Mail-41--1002622787 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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??). from here: = --------------------------------------------------------------------------= -------------------------------------- = --------------------------------------------------------------------------= -------------------------------------- From: Govinda Subject: Re: [WebDNA] GREP problem Date: 2011-04-21 11:53:44 AM EDT To: WebDNA talk Hi Stuart I got this to work for you: = --------------------------------------------------------------------------= -------------- = [text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:= ";'<>?,./=20 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] [text]cleanedString=3D[grep = search=3D[URL][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep][/te= xt] incomingString=3D[incomingString]
cleanedString=3D[cleanedString]
= --------------------------------------------------------------------------= -------------- 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 = --------------------------------------------------------------------------= -------------------------------------- = --------------------------------------------------------------------------= -------------------------------------- --Apple-Mail-41--1002622787 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

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

--------------------------= --------------------------------------------------------------------------= ------------
---------------------------------------------------= -------------------------------------------------------------
= --Apple-Mail-41--1002622787-- Associated Messages, from the most recent to the oldest:

    
--Apple-Mail-41--1002622787 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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??). from here: = --------------------------------------------------------------------------= -------------------------------------- = --------------------------------------------------------------------------= -------------------------------------- From: Govinda Subject: Re: [WebDNA] GREP problem Date: 2011-04-21 11:53:44 AM EDT To: WebDNA talk Hi Stuart I got this to work for you: = --------------------------------------------------------------------------= -------------- = [text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:= ";'<>?,./=20 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/text] [text]cleanedString=3D[grep = search=3D[url][^a-zA-Z0-9_+-][/URL]&replace=3D][incomingString][/grep][/te= xt] incomingString=3D[incomingString]
cleanedString=3D[cleanedString]
= --------------------------------------------------------------------------= -------------- 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 = --------------------------------------------------------------------------= -------------------------------------- = --------------------------------------------------------------------------= -------------------------------------- --Apple-Mail-41--1002622787 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

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

--------------------------= --------------------------------------------------------------------------= ------------
---------------------------------------------------= -------------------------------------------------------------
= --Apple-Mail-41--1002622787-- 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:

possible, WebCat2.0 and checkboxes-restated (1997) [WebDNA] WebDNA 7 running on new 32-bit Debian 6 server (2011) Two submit buttons ? (1997) WebDNA Writer Needed (1997) unable to run webcatalog locally (1998) [WebDNA] setcookie then redirect (2013) Re1000001: Setting up shop (1997) [ConvertChars] problem (1997) WC2b12: Yes, Formulas.db is for real (1997) Ready to h[url]!!! (1999) 2.0 Info (1997) Bug Report, maybe (1997) [Sum] function? (1997) upgrade? (1997) Reversed words (1997) syntax question, not in online refernce (1997) WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997) multiple databases (1997) Searching multiple fields from one form field (1997) Help name our technology! (1997)