Re: Grep help
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62176
interpreted = N
texte = This works fine.....[grep search=([url]href="[^"]*"[/url])&replace=\1target="blank"][blogtext][/grep]I seemed to have some tray characters at the end thatwere causing weirdnessthanks for the tips....onward--- Lester
wrote:> From this:> www.kwasi.com> I get this:> >> www.kwasi.com> > That middle " > " in the replace is sorta what> I> was getting in what Gary recoommended. All falls> apart> at that spot again it seems.> > > > --- devaulw@onebox.com wrote:> > > search=([url]href="[^"]*"[/url])> > replace=\1[url] target="blank"[/url]>> > > > That is where I'd start. The trick is getting the> => > by the parser.> > > > Bill> > > > -----Original Message-----> > From: Lester > > Sent: Sat, 11 Jun 2005 06:56:26 -0700 (PDT)> > To: "WebDNA Talk"> > > > Subject: Grep help> > > > I have a url appended to a database like this.> > (url comes from the use of fckeditor)> > > > www.kwasi.com> > or> > www.kwasi.com> > (that "space" may or may not be there depending on> > how> > the user did their links)> > > > > > I need it to have a _blank inserted when viewed> > > > > > www.kwasi.com> > > > > > Coming close with this but not quite there:> > > > [grep> >>search=(http://[+-;A-z0-9_\\:\/\.\~\`\?\+\-\=\#\%26]*)&replace= > href="\1" TARGET="_blank">\1][blogtext][/grep]> > > > Should I maybe have 2 searches and replaces> > happening> > here??> > > > > > These are user input urls in a blog so consistency> > etc> > will vary.> > > > Couldn't find any good grep explanations regarding> > the> > syntax. All the grep unix pages i come across> > reference command line type use.> > > > > > Thanks> > > > > > > > __________________________________________________> > Do You Yahoo!?> > Tired of spam? Yahoo! Mail has the best spam> > protection around > > http://mail.yahoo.com > > > >>-------------------------------------------------------------> > This message is sent to you because you are> > subscribed to> > the mailing list> > .> > To unsubscribe, E-mail to:> > > > To switch to the DIGEST mode, E-mail to> > > > Web Archive of this list is at:> > http://webdna.smithmicro.com/> > > > > > > >>-------------------------------------------------------------> > This message is sent to you because you are> > subscribed to> > the mailing list> > .> > To unsubscribe, E-mail to:> > > > To switch to the DIGEST mode, E-mail to> > > > Web Archive of this list is at:> > http://webdna.smithmicro.com/> > > > > > > __________________________________ > Discover Yahoo! > Get on-the-go sports scores, stock quotes, news and> more. Check it out! > http://discover.yahoo.com/mobile.html> >-------------------------------------------------------------> This message is sent to you because you are> subscribed to> the mailing list> .> To unsubscribe, E-mail to:> > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at:> http://webdna.smithmicro.com/> __________________________________________________Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
This works fine.....[grep search=([url]href="[^"]*"[/url])&replace=\1target="blank"][blogtext][/grep]I seemed to have some tray characters at the end thatwere causing weirdnessthanks for the tips....onward--- Lester wrote:> From this:> www.kwasi.com> I get this:> >> www.kwasi.com> > That middle " > " in the replace is sorta what> I> was getting in what Gary recoommended. All falls> apart> at that spot again it seems.> > > > --- devaulw@onebox.com wrote:> > > search=([url]href="[^"]*"[/url])> > replace=\1[url] target="blank"[/url]>> > > > That is where I'd start. The trick is getting the> => > by the parser.> > > > Bill> > > > -----Original Message-----> > From: Lester > > Sent: Sat, 11 Jun 2005 06:56:26 -0700 (PDT)> > To: "WebDNA Talk"> > > > Subject: Grep help> > > > I have a url appended to a database like this.> > (url comes from the use of fckeditor)> > > > www.kwasi.com> > or> > www.kwasi.com> > (that "space" may or may not be there depending on> > how> > the user did their links)> > > > > > I need it to have a _blank inserted when viewed> > > > > > www.kwasi.com> > > > > > Coming close with this but not quite there:> > > > [grep> >>search=(http://[+-;A-z0-9_\\:\/\.\~\`\?\+\-\=\#\%26]*)&replace= > href="\1" TARGET="_blank">\1][blogtext][/grep]> > > > Should I maybe have 2 searches and replaces> > happening> > here??> > > > > > These are user input urls in a blog so consistency> > etc> > will vary.> > > > Couldn't find any good grep explanations regarding> > the> > syntax. All the grep unix pages i come across> > reference command line type use.> > > > > > Thanks> > > > > > > > __________________________________________________> > Do You Yahoo!?> > Tired of spam? Yahoo! Mail has the best spam> > protection around > > http://mail.yahoo.com > > > >>-------------------------------------------------------------> > This message is sent to you because you are> > subscribed to> > the mailing list> > .> > To unsubscribe, E-mail to:> > > > To switch to the DIGEST mode, E-mail to> > > > Web Archive of this list is at:> > http://webdna.smithmicro.com/> > > > > > > >>-------------------------------------------------------------> > This message is sent to you because you are> > subscribed to> > the mailing list> > .> > To unsubscribe, E-mail to:> > > > To switch to the DIGEST mode, E-mail to> > > > Web Archive of this list is at:> > http://webdna.smithmicro.com/> > > > > > > __________________________________ > Discover Yahoo! > Get on-the-go sports scores, stock quotes, news and> more. Check it out! > http://discover.yahoo.com/mobile.html> >-------------------------------------------------------------> This message is sent to you because you are> subscribed to> the mailing list> .> To unsubscribe, E-mail to:> > To switch to the DIGEST mode, E-mail to> > Web Archive of this list is at:> http://webdna.smithmicro.com/> __________________________________________________Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Lester
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:
REPOST: How do _you_ back up your db? (2000)
Search & Sort Question (1999)
WebCat2.0 [format thousands .0f] no go (1997)
writefile on OSX (2004)
two of the same named db's open at once (1998)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
WCS Newbie question (1997)
Creating main- and sub-category search (1997)
database visibility (2000)
Mac v. NT (1998)
Silly Question (2003)
WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997)
price field blank causes server crash? (2004)
A question on sub-categories (1997)
database freeze (1997)
GoLive CyberStudio 1.0.1 (1997)
Kill the webcat process (2000)
Shipcost lookup? (1997)
Weird error/limit - something amiss? (1997)
in conversions.db crashes unix webcat (1999)