Re: grep twice or a better way....
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 69472
interpreted = N
texte = hmmmmm.I'll see if that works in a bit...so simple it just might LOLExcept in some cases people use some additionalformating, which hasn't been a problem in thesummaries, but the images/videos always would be... soremoving everything may be too much. But it's a way Inever thought of....lester--- Dan Strong
wrote:> maybe> > [getchars start=1&end=150]> [removeHTML][blogtext][/removeHTML]> [/getchars]> > ?> > > On Sun, 11 Nov 2007 10:56:20 -0800 (PST)> Lester wrote:> > I have a page where short summaries of posted> articles> > are shown.> > > > Currently some folks embed youtube videos as the> first> > item in their posts.> > > > They were doing this with images, but that I was> able> > to deal with.> > > > images:> > I use the following grep within my code to strip> out> > any instance of having an image appear in this> > summary.....> > > > [getchars start=1&end=150][grep> >>search=]*) &replace=][blogtext][/grep][/getchars]> > > > > > embed a video:> > If they did embed a youtube video (via tinymce> editor)> > this would be an example of the code I'm trying to> > strip out of these summary pages:> > > > >> classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"> >>codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> > width="425" height="355"> > value="425" /> > /> >>value="http://www.youtube.com/v/4NoQwyqDyXI&rel=1"> > /> > width="425" height="355"> >>src="http://www.youtube.com/v/4NoQwyqDyXI&rel=1"> > > > > > > > > Since I'm pulling just the first 150 characters> for> > the summary I'm having grief even if I try this:> > > > [getchars start=1&end=150][grep> >>search=]*)>&replace=][blogtext][/grep][/getchars]> > > > The above code does enough to NOT show the video> in> > the summary pages, buts it leaves remnants of the> > entire embed string.> > > > > > > > Any other ways I could maybe strip out all image> or> > embed code as I pull the text for these summary> pages?> > > > > > thanks> > > > > > Lester> > > > > > __________________________________________________> > 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/> __________________________________________________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:
hmmmmm.I'll see if that works in a bit...so simple it just might LOLExcept in some cases people use some additionalformating, which hasn't been a problem in thesummaries, but the images/videos always would be... soremoving everything may be too much. But it's a way Inever thought of....lester--- Dan Strong wrote:> maybe> > [getchars start=1&end=150]> [removehtml] [blogtext][/removeHTML]> [/getchars]> > ?> > > On Sun, 11 Nov 2007 10:56:20 -0800 (PST)> Lester wrote:> > I have a page where short summaries of posted> articles> > are shown.> > > > Currently some folks embed youtube videos as the> first> > item in their posts.> > > > They were doing this with images, but that I was> able> > to deal with.> > > > images:> > I use the following grep within my code to strip> out> > any instance of having an image appear in this> > summary.....> > > > [getchars start=1&end=150][grep> >>search=]*) &replace=][blogtext][/grep][/getchars]> > > > > > embed a video:> > If they did embed a youtube video (via tinymce> editor)> > this would be an example of the code I'm trying to> > strip out of these summary pages:> > > > >> classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"> >>codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> > width="425" height="355"> > value="425" /> > /> >>value="http://www.youtube.com/v/4NoQwyqDyXI&rel=1"> > /> > width="425" height="355"> >>src="http://www.youtube.com/v/4NoQwyqDyXI&rel=1"> > > > > > > > > Since I'm pulling just the first 150 characters> for> > the summary I'm having grief even if I try this:> > > > [getchars start=1&end=150][grep> >>search=]*)>&replace=][blogtext][/grep][/getchars]> > > > The above code does enough to NOT show the video> in> > the summary pages, buts it leaves remnants of the> > entire embed string.> > > > > > > > Any other ways I could maybe strip out all image> or> > embed code as I pull the text for these summary> pages?> > > > > > thanks> > > > > > Lester> > > > > > __________________________________________________> > 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/> __________________________________________________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:
Re:[ShowIf] and empty fields (1997)
WC in FL (1999)
& Problem in Textarea (1999)
[WebDNA] Still having problems (2008)
Extended [ConvertChars] (1997)
Upgrading old WebCat Database Files (1997)
Week # problem (1998)
Re:2nd WebCatalog2 Feature Request (1996)
Size limit for tmpl editor ? (1997)
Dates (1996)
One more browser problem to watch out for... (1997)
Cookie Question (1999)
Shell Script needed (2003)
Date field search needs ... (1998)
[price] via a search (1998)
[carts] and databases (1997)
Copyright that puppy (1998)
Before I Can Begin . . . (1998)
To Cookie or Not to Cookie? Was: duplicate cart numbers (2002)
WebCat Bulletin Board Solution ? (1998)