Re: [WebDNA] GREP problem
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106556
interpreted = N
texte = Hi StuartI got this to work for you:=--------------------------------------------------------------------------=--------------=[text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:=";'<>?,./=201234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/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.)-GOn 2011-04-20, at 10:45 PM, Stuart Tremain wrote:> 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- Govinda--------------Old WebDNA talklist archives:http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk
Associated Messages, from the most recent to the oldest:
Hi StuartI got this to work for you:=--------------------------------------------------------------------------=--------------=
[text]incomingString=3Dabcdefghijklmnopqrstuvwxyz~!@#$%^&*()_+`-=3D{}|[]\:=";'<>?,./=201234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[/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.)-GOn 2011-04-20, at 10:45 PM, Stuart Tremain wrote:> 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- 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:
Multiple CPUs? (2000)
Ariba XML support help needed (2004)
[WebDNA] NJ WebDNA Host (2009)
Quitting WebMerchant ? (1997)
Need relative path explanation (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
Encypt Question - Making New Users.db (1999)
HTML encoding in URLs (1997)
[OT] Graphic Art Services (2004)
WebCat2b13MacPlugIn - More limits on [include] (1997)
tracking variables across a site... (2000)
SiteEdit Pro Update Announcement (1997)
[WebDNA] Converting a CSV file to a WebDNA db automatically? (2016)
Striping Characters (1998)
Country & Ship-to address & other fields ? (1997)
Comments in db? (1997)
WebCat2b15MacPlugin - [protect] (1997)
UPS, FEDEX TRACKING (1999)
select multiple (1997)
[WebDNA] WebDNA Lounge Act (2010)