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:

problems with 2 tags (1997) HELP WITH DATES (1997) Incorrect Value Display (2000) SiteEdit Pro Update Announcement (1997) Robert Minor duplicate mail (1997) Email (1998) ampersand (1998) WebDNA 5.1/Apache 2 (2003) Accented chars and emailer (1998) [WebDNA] Issue with including functions (2011) Flash Applications (2003) Any Newsletters out there (1998) [TaxableTotal] - not working with AOL and IE (1997) [OT] Thinking about a new Mac server (2004) 'does not contain' operator needed ... (1997) Slightly off-topic hits to purchase ratio? (1999) Re:2nd WebCatalog2 Feature Request (1996) Re2: AAgghh!! Help, please. SSL strikes again. (1997) TCP Connect (2000) IIS4b2 and WebCatalog b19 (1997)